function debugPrint($pText = null, $pStop = null) { return; global $_start, $_lastDebugPoint; $timeUsed = round((microtime(true) - $_start) * 1000, 2); $bytes = convertSize(memory_get_usage(true)); $last = $_lastDebugPoint ? '(' . round((microtime(true) - $_lastDebugPoint) * 1000, 2) . 'ms)' : ''; $text = is_string($pText) ? "\t(" . $pText . ')' : ''; print "{$bytes}\t{$timeUsed}ms\t{$last}{$text}\n"; $_lastDebugPoint = microtime(true); if ($pStop === true) { exit; } }
} if ($docopy == "true") { $name = "{$upload_name}"; $tmpquery = "UPDATE " . $tableCollab["files"] . " SET name='{$name}',date='{$dateheure}',size='{$size}',extension='{$extension}',vc_version='{$oldversion}' WHERE id = '{$num}'"; connectSql("{$tmpquery}"); headerFunction("clientfiledetail.php?id={$sendto}&msg=addFile&" . session_name() . "=" . session_id()); exit; } } //--------------------------------------------------------------------------------------------------- $bouton[4] = "over"; $titlePage = $strings["document"]; include "include_header.php"; // TABLE 1 - FILE DETAILS TABLE. echo "<table cellpadding=20 cellspacing=0 border=0 width=\"100%\">\n <tr>\n <td><h1 class=\"heading\">" . $strings["document"] . "</h1>\n\t<table cellspacing=\"0\" width=\"90%\" border=\"0\" cellpadding=\"4\" cols=\"4\">\n\t<tr><td width=\"40%\"><table cellspacing=\"0\" width=\"100%\" border=\"0\" cellpadding=\"0\">"; echo "<tr class=\"odd\"><td valign=\"top\" class=\"leftvalue2\">" . $strings["type"] . " : </td><td><img src=\"../interface/icones/{$type}\" border=\"0\" alt=\"\"></td></tr>\n\t<tr class=\"odd\"><td valign=\"top\" class=\"leftvalue2\">" . $strings["name"] . " : </td><td>" . $fileDetail->fil_name[0] . "</td></tr>\n\t<tr class=\"odd\"><td valign=\"top\" class=\"leftvalue2\">" . $strings["vc_version"] . " :</td><td>" . $fileDetail->fil_vc_version[0] . "</td></tr>\n\t<tr class=\"odd\"><td valign=\"top\" class=\"leftvalue2\">" . $strings["ifc_last_date"] . " :</td><td>" . $fileDetail->fil_date[0] . "</td></tr>\n\t<tr class=\"odd\"><td valign=\"top\" class=\"leftvalue2\">" . $strings["size"] . ":</td><td>" . convertSize($fileDetail->fil_size[0]) . "</td></tr>\n\t<tr class=\"odd\"><td valign=\"top\" class=\"leftvalue2\">" . $strings["owner"] . " :</td><td><a href=\"contactdetail.php?{$transmitSid}&id=" . $fileDetail->fil_mem_id[0] . "\">" . $fileDetail->fil_mem_name[0] . "</a> (<a href=\"mailto:" . $fileDetail->fil_mem_email_work[0] . "\">" . $fileDetail->fil_mem_login[0] . "</a>)</td></tr>"; if ($fileDetail->fil_comments[0] != "") { echo "<tr class=\"odd\"><td valign=\"top\" class=\"leftvalue2\">" . $strings["comments"] . " :</td><td>" . nl2br($fileDetail->fil_comments[0]) . "</td></tr>"; } $idStatus = $fileDetail->fil_status[0]; echo "<tr class=\"odd\"><td valign=\"top\" class=\"leftvalue2\">" . $strings["approval_tracking"] . " :</td><td><a href=\"docitemapproval.php?{$transmitSid}&id=" . $fileDetail->fil_id[0] . "\">{$statusFile[$idStatus]}</a></td></tr>"; if ($fileDetail->fil_mem2_id[0] != "") { echo "<tr class=\"odd\"><td valign=\"top\" class=\"leftvalue2\">" . $strings["approver"] . " :</td><td><a href=\"userdetail.php?{$transmitSid}&id=" . $fileDetail->fil_mem2_id[0] . "\">" . $fileDetail->fil_mem2_name[0] . "</a> (<a href=\"mailto:" . $fileDetail->fil_mem2_email_work[0] . "\">" . $fileDetail->fil_mem2_login[0] . "</a>) </td></tr>"; echo "<tr class=\"odd\"><td valign=\"top\" class=\"leftvalue2\">" . $strings["approval_date"] . " :</td><td>" . $fileDetail->fil_date_approval[0] . " </td></tr>"; } if ($fileDetail->fil_comments_approval[0] != "") { echo "<tr class=\"odd\"><td valign=\"top\" class=\"leftvalue2\">" . $strings["approval_comments"] . " :</td><td>" . nl2br($fileDetail->fil_comments_approval[0]) . " </td></tr>"; } //------------------------------------------------------------------ $tmpquery = "WHERE fil.id = '{$id}' OR fil.vc_parent = '{$id}' AND fil.vc_status = '3' ORDER BY fil.date DESC"; $listVersions = new request();
if ($fileDetail->mat_owner[0] == $_SESSION['idSession']) { $block1->openPaletteIcon(); $block1->paletteIcon(0, "remove", $strings["ifc_delete_version"]); $block1->paletteIcon(1, "add_projectsite", $strings["add_project_site"]); $block1->paletteIcon(2, "remove_projectsite", $strings["remove_project_site"]); $block1->closePaletteIcon(); } else { $block1->heading_close(); } if ($error1 != "") { $block1->headingError($strings["errors"]); $block1->contentError($error1); } $block1->openContent(); $block1->contentTitle($strings["details"]); echo "<tr class=\"odd\"><td valign=\"top\" class=\"leftvalue\">" . $strings["type"] . " :</td><td><img src=\"../interface/icones/{$type}\" border=\"0\" alt=\"\"></td></tr>\r\n<tr class=\"odd\"><td valign=\"top\" class=\"leftvalue\">" . $strings["name"] . " :</td><td>" . $fileDetail->mat_name[0] . "</td></tr>\r\n<tr class=\"odd\"><td valign=\"top\" class=\"leftvalue\">" . $strings["vc_version"] . " :</td><td>" . $fileDetail->mat_vc_version[0] . "</td></tr>\r\n<tr class=\"odd\"><td valign=\"top\" class=\"leftvalue\">" . $strings["ifc_last_date"] . " :</td><td>" . $fileDetail->mat_date[0] . "</td></tr>\r\n<tr class=\"odd\"><td valign=\"top\" class=\"leftvalue\">" . $strings["size"] . ":</td><td>" . convertSize($fileDetail->mat_size[0]) . "</td></tr>\r\n<tr class=\"odd\"><td valign=\"top\" class=\"leftvalue\">" . $strings["owner"] . " :</td><td>" . buildLink("../users/viewuser.php?id=" . $fileDetail->mat_mem_id[0], $fileDetail->mat_mem_name[0], LINK_INSIDE) . " (" . buildLink($fileDetail->mat_mem_email_work[0], $fileDetail->mat_mem_login[0], LINK_MAIL) . ")</td></tr>"; if ($fileDetail->mat_comments[0] != "") { echo "<tr class=\"odd\"><td valign=\"top\" class=\"leftvalue\">" . $strings["comments"] . " :</td><td>" . nl2br($fileDetail->mat_comments[0]) . " </td></tr>"; } $idPublish = $fileDetail->mat_published[0]; echo "<tr class=\"odd\"><td valign=\"top\" class=\"leftvalue\">" . $strings["published"] . " :</td><td>{$statusPublish[$idPublish]}</td></tr>"; $idStatus = $fileDetail->mat_status[0]; echo "<tr class=\"odd\"><td valign=\"top\" class=\"leftvalue\">" . $strings["approval_tracking"] . " :</td><td>{$statusFile[$idStatus]}</td></tr>"; if ($fileDetail->mat_mem2_id[0] != "") { echo "<tr class=\"odd\"><td valign=\"top\" class=\"leftvalue\">" . $strings["approver"] . " :</td><td>" . buildLink("../users/viewuser.php?id=" . $fileDetail->mat_mem2_id[0], $fileDetail->mat_mem2_name[0], LINK_INSIDE) . " (" . buildLink($fileDetail->mat_mem2_email_work[0], $fileDetail->mat_mem2_login[0], LINK_MAIL) . ") </td></tr>"; echo "<tr class=\"odd\"><td valign=\"top\" class=\"leftvalue\">" . $strings["approval_date"] . " :</td><td>" . $fileDetail->mat_date_approval[0] . " </td></tr>"; } if ($fileDetail->mat_comments_approval[0] != "") { echo "<tr class=\"odd\"><td valign=\"top\" class=\"leftvalue\">" . $strings["approval_comments"] . " :</td><td>" . nl2br($fileDetail->mat_comments_approval[0]) . " </td></tr>"; } // ------------------------------------------------------------------
return ''; } db_open(); if (isset($_REQUEST['bt_search'])) { saveSearchParams($_SERVER['PHP_SELF'], array('bt_search', 'tag_pattern', 'term', 'min_size', 'max_size', 'category1', 'category2', 'category3', 'category4', 'category_not1', 'category_not2', 'category_not3', 'category_not4', 'files_only', 'group_by_disk', 'sort')); htmldb_set_hilight_words(array($_REQUEST["term"])); $tables = array(); $term = convertWildcards($_REQUEST["term"]); $crit = "(Filename LIKE '%{$term}%' OR BetterName LIKE '%{$term}%')"; if (isset($_REQUEST["tag_pattern"])) { $tag = convertWildcards($_REQUEST['tag_pattern']); $crit .= " AND disk.tag LIKE '{$tag}'"; } if ($_REQUEST['min_size'] != '' || $_REQUEST['max_size'] != '') { $min_size = convertSize($_REQUEST['min_size']); $max_size = convertSize($_REQUEST['max_size']); if ($min_size != '') { $crit .= " AND Size >= '{$min_size}'"; } if ($max_size != '') { $crit .= " AND Size < '{$max_size}'"; } } $crit .= make_category_criteria($_REQUEST['category1'], $_REQUEST['category_not1'], $_REQUEST['category_from1'], $_REQUEST['category_to1']); $crit .= make_category_criteria($_REQUEST['category2'], $_REQUEST['category_not2'], $_REQUEST['category_from2'], $_REQUEST['category_to2']); $crit .= make_category_criteria($_REQUEST['category3'], $_REQUEST['category_not3'], $_REQUEST['category_from3'], $_REQUEST['category_to3']); $crit .= make_category_criteria($_REQUEST['category4'], $_REQUEST['category_not4'], $_REQUEST['category_from4'], $_REQUEST['category_to4']); if (isset($_REQUEST["files_only"])) { $crit .= " AND is_dir=0"; } $sort = array();
public static function showStats() { Timer::stop(); $executionTime = Timer::get(); $queries = null === Utils::get('NbQueries') ? 0 : Utils::get('NbQueries'); $valQueries = $queries < 2 ? 'SQL Query executed' : 'SQL Queries executed'; $SQLDuration = null === Utils::get('SQLTotalDuration') ? 0 : Utils::get('SQLTotalDuration'); $queriesNoSQL = null === Utils::get('NbQueriesNOSQL') ? 0 : Utils::get('NbQueriesNOSQL'); $valQueriesNoSQL = $queriesNoSQL < 2 ? 'NoSQL Query executed' : 'NoSQL Queries executed'; $SQLDurationNoSQL = null === Utils::get('SQLTotalDurationNOSQL') ? 0 : Utils::get('SQLTotalDurationNOSQL'); $execPHPSQL = $executionTime - $SQLDuration; $execPHPNoSQL = $executionTime - $SQLDurationNoSQL; $execPHP = $executionTime - $SQLDuration; $PCPhp = round($execPHP / $executionTime * 100, 2); $PCPhpSQL = round($execPHPSQL / $executionTime * 100, 2); $PCPhpNoSQL = round($execPHPNoSQL / $executionTime * 100, 2); $PCSQL = 100 - $PCPhpSQL; $PCNoSQL = 100 - $PCPhpNoSQL; $included = count(get_included_files()); return "\n<!--\n\n\tPage generated in {$executionTime} s. by Thin Framework (C) www.geraldplusquellec.me 1996 - " . date('Y') . "\n\t{$queries} {$valQueries} in {$SQLDuration} s. (" . $PCSQL . " %)\n\t{$queriesNoSQL} {$valQueriesNoSQL} in {$SQLDurationNoSQL} s. (" . $PCNoSQL . " %)\n\tPHP Execution {$execPHP} s. ({$PCPhp} %)\n\n\n\n\t" . $included . " scripts included\n\tUsed Memory : " . convertSize(memory_get_usage()) . "\n\n-->"; }
$block1->contentRow($strings['ical_url'], buildLink("{$root}/calendar/icalendar.php", "{$root}/calendar/icalendar.php", LINK_OUT)); $block1->contentRow($strings['url_dev'], buildLink($projectDetail->pro_url_dev[0], $projectDetail->pro_url_dev[0], LINK_OUT)); $block1->contentRow($strings['url_prod'], buildLink($projectDetail->pro_url_prod[0], $projectDetail->pro_url_prod[0], LINK_OUT)); $block1->contentRow($strings['owner'], buildLink('../users/viewuser.php?id=' . $projectDetail->pro_mem_id[0], $projectDetail->pro_mem_name[0], LINK_INSIDE) . ' (' . buildLink($projectDetail->pro_mem_email_work[0], $projectDetail->pro_mem_login[0], LINK_MAIL) . ')'); $block1->contentRow($strings['created'], createDate($projectDetail->pro_created[0], $_SESSION['timezoneSession'])); $block1->contentRow($strings['modified'], createDate($projectDetail->pro_modified[0], $_SESSION['timezoneSession'])); if ($projectDetail->pro_org_id[0] == '1') { $block1->contentRow($strings['organization'], $strings['none']); } else { $block1->contentRow($strings['organization'], buildLink('../clients/viewclient.php?id=' . $projectDetail->pro_org_id[0], $projectDetail->pro_org_name[0], LINK_INSIDE)); } $block1->contentRow($strings['status'], $status[$idStatus]); $block1->contentRow($strings['type'], $projectType[$projectDetail->pro_type[0]]); if ($fileManagement == 'true') { $block1->contentRow($strings['max_upload'] . $blockPage->printHelp('max_file_size'), convertSize($projectDetail->pro_upload_max[0])); $block1->contentRow($strings['project_folder_size'] . $blockPage->printHelp('project_disk_space'), convertSize(folder_info_size('../files/' . $projectDetail->pro_id[0] . '/'))); } $block1->contentRow($strings['estimated_time'], $estimated_time . ' ' . $strings['hours']); $block1->contentRow($strings['actual_time'], $proj_time . ' ' . $strings['hours']); $block1->contentRow($strings['scope_creep'] . $blockPage->printHelp('project_scope_creep'), $diff_time . ' ' . $strings['days']); if ($sitePublish == 'true') { if ($projectDetail->pro_published[0] == '1') { $block1->contentRow($strings['project_site'], '<' . buildLink('../projects/addprojectsite.php?id=' . $id, $strings['create'] . '...', LINK_INSIDE) . '>'); } else { $block1->contentRow($strings['project_site'], '<' . buildLink('../projects/viewprojectsite.php?id=' . $id, $strings['details'], LINK_INSIDE) . '>'); } } if ($enableHelpSupport == 'true' && ($teamMember == 'true' || $_SESSION['profilSession'] == '5') && $supportType == 'team') { $block1->contentTitle($strings['support']); $block1->contentRow($strings['new_requests'], $comptListNewRequests . ' - ' . buildLink('../support/support.php?action=new&project=' . $projectDetail->pro_id[0], $strings['manage_new_requests'], LINK_INSIDE)); $block1->contentRow($strings['open_requests'], $comptListOpenRequests . ' - ' . buildLink('../support/support.php?action=open&project=' . $projectDetail->pro_id[0], $strings['manage_open_requests'], LINK_INSIDE));
if ($databaseType == "postgresql") { $databaseTypeMore = "PostgreSQL"; $link = pg_connect("host=" . MYSERVER . " port=5432 dbname=" . MYDATABASE . " user="******" password="******"SELECT VERSION() as version"; $res = pg_query($link, $local_query); $databaseVersion = pg_result($res, 0, 'version'); } if ($databaseType == "sqlserver") { $databaseTypeMore = "Sql Server"; $link = mssql_connect(MYSERVER, MYLOGIN, MYPASSWORD) or die("Connection impossible"); $local_query = "SELECT @@version as version"; $res = mssql_query($local_query, $link); $databaseVersion = mssql_result($res, 0, 'version'); } $block1->contentRow("Database Type", $databaseTypeMore); $block1->contentRow("Files folder size", convertSize(folder_info_size("../files/"))); $block1->contentTitle($strings["system_properties"]); $block1->contentRow("PHP Version", phpversion() . " " . $blockPage->buildLink("../administration/phpinfo.php?", "PhpInfo", inblank)); $block1->contentRow($databaseTypeMore . " version", $databaseVersion); $block1->contentRow("extension_dir", ini_get(extension_dir)); $ext = get_loaded_extensions(); $comptExt = count($ext); for ($i = 0; $i < $comptExt; $i++) { $extensions .= "{$ext[$i]}"; if ($i != $comptExt - 1) { $extensions .= ', '; } } $block1->contentRow("Loaded extensions", $extensions); $include_path = ini_get(include_path); if ($include_path == "") {
$block1->contentRow('Product Site Publish', $sitePublish); $block1->contentRow('Notifications', $notifications); $block1->contentRow('Root', $root); if ($useLDAP == true) { $loginMethodMore = ' + LDAP'; } $block1->contentRow('Login Method', $loginMethod . $loginMethodMore); if ($databaseType == 'mysql') { $databaseTypeMore = 'MySql'; $MY_DBH = openDatabase(); $local_query = 'SELECT VERSION() as version'; $res = mysql_query($local_query, $MY_DBH); $databaseVersion = mysql_result($res, 0, 'version'); } $block1->contentRow('Database Type', $databaseTypeMore); $block1->contentRow('Files folder size', convertSize(folder_info_size('../files/'))); $block1->contentTitle($strings['system_properties']); $block1->contentRow('PHP Version', phpversion() . ' ' . buildLink('../administration/phpinfo.php?', 'PhpInfo', LINK_BLANK)); $block1->contentRow($databaseTypeMore . ' version', $databaseVersion); $block1->contentRow('extension_dir', ini_get(extension_dir)); $ext = get_loaded_extensions(); $comptExt = count($ext); for ($i = 0; $i < $comptExt; $i++) { $extensions .= $ext[$i]; if ($i != $comptExt - 1) { $extensions .= ', '; } } $block1->contentRow('Loaded extensions', $extensions); $include_path = ini_get(include_path); if ($include_path == '') {
} $block1->contentRow($strings["description"], nl2br($projectDetail->pro_description[0])); $block1->contentRow($strings["url_dev"], $blockPage->buildLink($projectDetail->pro_url_dev[0], $projectDetail->pro_url_dev[0], out)); $block1->contentRow($strings["url_prod"], $blockPage->buildLink($projectDetail->pro_url_prod[0], $projectDetail->pro_url_prod[0], out)); $block1->contentRow($strings["owner"], $blockPage->buildLink("../users/viewuser.php?id=" . $projectDetail->pro_mem_id[0], $projectDetail->pro_mem_name[0], in) . " (" . $blockPage->buildLink($projectDetail->pro_mem_email_work[0], $projectDetail->pro_mem_login[0], mail) . ")"); $block1->contentRow($strings["created"], createDate($projectDetail->pro_created[0], $timezoneSession)); $block1->contentRow($strings["modified"], createDate($projectDetail->pro_modified[0], $timezoneSession)); if ($projectDetail->pro_org_id[0] == "1") { $block1->contentRow($strings["organization"], $strings["none"]); } else { $block1->contentRow($strings["organization"], $blockPage->buildLink("../clients/viewclient.php?id=" . $projectDetail->pro_org_id[0], $projectDetail->pro_org_name[0], in)); } $block1->contentRow($strings["status"], $status[$idStatus]); if ($fileManagement == "true") { $block1->contentRow($strings["max_upload"] . $blockPage->printHelp("max_file_size"), convertSize($projectDetail->pro_upload_max[0])); $block1->contentRow($strings["project_folder_size"] . $blockPage->printHelp("project_disk_space"), convertSize(folder_info_size("../files/" . $projectDetail->pro_id[0] . "/"))); } $block1->contentRow($strings["estimated_time"], $estimated_time . " " . $strings["hours"]); $block1->contentRow($strings["actual_time"], $actual_time . " " . $strings["hours"]); $block1->contentRow($strings["scope_creep"] . $blockPage->printHelp("project_scope_creep"), $diff_time . " " . $strings["days"]); if ($sitePublish == "true") { if ($projectDetail->pro_published[0] == "1") { $block1->contentRow($strings["project_site"], "<" . $blockPage->buildLink("../projects/addprojectsite.php?id={$id}", $strings["create"] . "...", in) . ">"); } else { $block1->contentRow($strings["project_site"], "<" . $blockPage->buildLink("../projects/viewprojectsite.php?id={$id}", $strings["details"], in) . ">"); } } if ($enableInvoicing == "true" && ($idSession == $projectDetail->pro_owner[0] || $profilSession == "0" || $profilSession == "5")) { if ($projectDetail->pro_invoicing[0] == "1") { $block1->contentRow($strings["invoicing"], $strings["true"]); } else {