$TempPath = ini_get('include_path') . ":/var/www/html:/var/www/admin:/var/www/SCO"; ini_set('include_path', $TempPath); include_once("Utils.php"); include_once("Header.php"); include_once("Generic-DB.php"); $DB['Host'] = 'localhost'; $DB['User'] = 'root'; $DB['Password'] = 'NA0LIVuy'; $DB['Name'] = 'Projects'; ConnectDB(); function ReplaceStrings($InputString, $URI, $Title) { $InputString = str_replace("{PROJECT_DIR}", $URI . "/", $InputString); $InputString = str_replace("{PROJECT_NAME}", $Title, $InputString); return($InputString); } function NotMaintained() { echo "
Note: This project is no longer actively maintained, but the code is available if you want it.
\n"; } $ProjectID = ''; $ProjectName = GetVar('Project'); if ($ProjectName != '') { $ProjectIDs = array_keys(GetTableData("SELECT ID FROM Projects where `Title`='$ProjectName' AND `visible`='true'")); if (count($ProjectIDs) != 1) $ProjectID = ''; else $ProjectID = $ProjectIDs[0]; } else $ProjectID = GetVar('ProjectID', $ProjectID); if ($ProjectID != '') { $ProjectInfo = GetTableData("SELECT * FROM Projects WHERE `ID`='$ProjectID' AND `visible`='true'"); $ProjectInfo = $ProjectInfo[$ProjectID]; echo "" . $ProjectInfo['Title'] . "
\n"; # echo "" . $ProjectInfo[Description] . "
\n"; $InfoFile = $ProjectInfo['URI'] . "/project.info"; if (file_exists($InfoFile)) { echo ReplaceStrings(file_get_contents($InfoFile), $ProjectInfo['URI'], $ProjectInfo['Title']); } if ($ProjectInfo['maintained'] != 'true') NotMaintained(); } else { $ProjectsInfo = GetTableData("SELECT * FROM Projects WHERE `visible`='true' ORDER BY `maintained` DESC,`Updated` DESC"); foreach ($ProjectsInfo as $Key => $ProjectInfo) { echo "\n"; echo "" . ReplaceStrings($ProjectInfo['Description'], $ProjectInfo['URI'], $ProjectInfo['Title']) . "
\n"; if ($ProjectInfo['maintained'] != 'true') NotMaintained(); } } include_once("Footer.php"); ?>