<?php include_once "//var/www/gip/app/settings/gipConfiguration.inc.php"; include_once INC_SUPERHEADER; include_once CLASS_PLUGIN_LOADER; $thisPlugInLoader = new plugInLoader(); $arguments = array(); $arguments['db'] = requestUtils::getRequestObject('db'); $arguments['table'] = requestUtils::getRequestObject('table'); $generatedCode = $thisPlugInLoader->loadPlugIn(PLUGIN_PHP_GENIE_WEB_DELETE_GENERATOR_NAME, PLUGIN_PHP_GENIE_WEB_DELETE_GENERATOR_CLASS, $arguments); highlight_string($generatedCode);
<?php include_once "//var/www/gip/app/settings/gipConfiguration.inc.php"; include_once INC_SUPERHEADER; include_once CLASS_TABLE; include_once CLASS_PLUGIN_LOADER; $thisPlugInLoader = new plugInLoader(); $arguments = array(); $arguments['db'] = requestUtils::getRequestObject('db'); $arguments['table'] = requestUtils::getRequestObject('table'); $arguments['headerText'] = ""; $arguments['footerText'] = ""; $thisTable = new table($arguments['table'], $arguments['db']); $allFields = $thisTable->getFieldNameArray(); $fields = requestUtils::getRequestObject("chosenFieldName"); for ($a = 0; $a < count($allFields); $a++) { $fieldSize[$allFields[$a]] = requestUtils::getRequestObject("size" . $allFields[$a]); $fieldType[$allFields[$a]] = requestUtils::getRequestObject("inputType" . $allFields[$a]); $fieldLabel[$allFields[$a]] = requestUtils::getRequestObject("label" . $allFields[$a]); } $arguments['chosenFields'] = requestUtils::getRequestObject('chosenFieldName'); $arguments['fieldSize'] = $fieldSize; $arguments['fieldType'] = $fieldType; $arguments['label'] = $fieldLabel; $arguments['formType'] = requestUtils::getRequestObject('formType'); $generatedCode = $thisPlugInLoader->loadPlugIn(PLUGIN_PHP_SIMPLE_WEB_ENTER_FORM_GENERATOR_NAME, PLUGIN_PHP_SIMPLE_WEB_ENTER_FORM_GENERATOR_CLASS, $arguments); highlight_string($generatedCode);
<?php include_once "//var/www/gip/app/settings/gipConfiguration.inc.php"; include_once INC_SUPERHEADER; include_once CLASS_PLUGIN_LOADER; include_once CLASS_TABLE; $thisPlugInLoader = new plugInLoader(); $arguments = array(); $thisDb = requestUtils::getRequestObject('db'); $thisTable = requestUtils::getRequestObject('table'); $tableObject = new table($thisTable, $thisDb); $arguments['variables'] = $tableObject->getFieldNameArray(); $arguments['functions'] = array(); $arguments['className'] = strtolower($thisTable) . ucfirst(strtolower(NAME_DATA_CONTAINER)); $generatedCode = $thisPlugInLoader->loadPlugIn(PLUGIN_PHP_CLASS_GENERATOR_NAME, PLUGIN_PHP_CLASS_GENERATOR_CLASS, $arguments); highlight_string($generatedCode);
} if ($thisGenView == "y") { $arguments = ""; $arguments['table'] = $thisTables[$a]; $arguments['db'] = requestUtils::getRequestObject('db'); $arguments['headerText'] = $headerText; $arguments['footerText'] = $footerText; $generatedViewCode = $thisPlugInLoader->loadPlugIn(PLUGIN_PHP_SIMPLE_WEB_VIEW_RECORD_GENERATOR_NAME, PLUGIN_PHP_SIMPLE_WEB_VIEW_RECORD_GENERATOR_CLASS, $arguments); $viewFileName = "view" . ucfirst($currentTable) . ".php"; $thisFileUtils->writeContentsToFile($currentDirectory, $viewFileName, $generatedViewCode); echo "<li>Generating <font color=blue><b>View One Record</b></font> for " . $currentTable . "</li>"; } if ($thisGenIndex == "y") { $arguments = ""; $arguments['table'] = $thisTables[$a]; $arguments['db'] = requestUtils::getRequestObject('db'); $arguments['headerText'] = $headerText; $arguments['footerText'] = $footerText; $generatedIndexCode = $thisPlugInLoader->loadPlugIn(PLUGIN_PHP_SIMPLE_MAIN_INDEX_GENERATOR_NAME, PLUGIN_PHP_SIMPLE_MAIN_INDEX_GENERATOR_CLASS, $arguments); $indexFileName = "index" . ucfirst($currentTable) . ".inc.php"; $thisFileUtils->writeContentsToFile($indexDirectory, $indexFileName, $generatedIndexCode); $mainIndexes[] .= "./index/" . $indexFileName; } echo "</ul>"; } // end for a $col = 0; $mainIndexFile = ""; $mainIndexFile = "<? include_once(\"common/header.php\"); ?>\n\n"; $mainIndexFile .= "<table cellspacing=10 cellpadding=9>\n"; $mainIndexFile .= "\t<tr>\n";
<?php include_once "//var/www/gip/app/settings/gipConfiguration.inc.php"; include_once INC_SUPERHEADER; include_once CLASS_DATABASE_QUERY; include_once CLASS_PLUGIN_LOADER; $thisPlugInLoader = new plugInLoader(); $thisDbQuery = new databaseQuery(); $arguments = array(); $arguments['headerText'] = ""; $arguments['footerText'] = ""; $arguments['db'] = requestUtils::getRequestObject('db'); $thisDbQuery->useDatabase(requestUtils::getRequestObject('db')); $allTables = $thisDbQuery->getTables(); for ($a = 0; $a < count($allTables); $a++) { $arguments['table'] = $allTables[$a]; echo "<h2>" . $arguments['table'] . "</h2>"; $generatedInsertCode = $thisPlugInLoader->loadPlugIn(PLUGIN_PHP_SIMPLE_WEB_INSERT_GENERATOR_NAME, PLUGIN_PHP_SIMPLE_WEB_INSERT_GENERATOR_CLASS, $arguments); $generatedDeleteCode = $thisPlugInLoader->loadPlugIn(PLUGIN_PHP_SIMPLE_WEB_DELETE_GENERATOR_NAME, PLUGIN_PHP_SIMPLE_WEB_DELETE_GENERATOR_CLASS, $arguments); $generatedUpdateCode = $thisPlugInLoader->loadPlugIn(PLUGIN_PHP_SIMPLE_WEB_UPDATE_GENERATOR_NAME, PLUGIN_PHP_SIMPLE_WEB_UPDATE_GENERATOR_CLASS, $arguments); $generatedListerCode = $thisPlugInLoader->loadPlugIn(PLUGIN_PHP_SIMPLE_WEB_LISTER_GENERATOR_NAME, PLUGIN_PHP_SIMPLE_WEB_LISTER_GENERATOR_CLASS, $arguments); highlight_string($generatedInsertCode); echo "<hr>"; highlight_string($generatedDeleteCode); echo "<hr>"; highlight_string($generatedUpdateCode); echo "<hr>"; highlight_string($generatedListerCode); echo "<hr>"; }
$thisGeneratePath = requestUtils::getRequestObject('generatePath'); $thisConfigFile = requestUtils::getRequestObject('configFile'); $thisGenDao = requestUtils::getRequestObject('genDao'); $thisGenManager = requestUtils::getRequestObject('genManager'); $thisInfoObject = requestUtils::getRequestObject('infoObject'); $thisManager = requestUtils::getRequestObject('manager'); $thisDao = requestUtils::getRequestObject('dao'); $thisConstants = requestUtils::getRequestObject('constants'); $thisCopyCommon = requestUtils::getRequestObject('copyCommon'); $thisFrontEnd = requestUtils::getRequestObject('frontEnd'); $thisLanguage = requestUtils::getRequestObject('language'); $thisTables = requestUtils::getRequestObject('tableName'); $thisDb = requestUtils::getRequestObject('db'); $thisTable = requestUtils::getRequestObject('table'); $headerText = requestUtils::getRequestObject('headerText'); $footerText = requestUtils::getRequestObject('footerText'); $tableSideBar = ""; $thisFileUtils = new fileSystemUtils(); $thisCommonFileCopier = new gipCommonFileCopier(); if ($thisConfigFile == ".conf.php") { $thisConfigFile = DEFAULT_CONFIGURATION_FILE_NAME . ".conf.php"; } $arguments['db'] = $thisDb; $mainIndexes = array(); echo "All Code will be generated in path <font color=red><b>" . $thisGeneratePath . "</b></font><br><br>"; $thisFileUtils->makeDirectoryRecursive($thisGeneratePath); if (!$thisFileUtils->doesDirectoryExists($thisGeneratePath)) { ?> The path that you have entered to be the root for your code Generation does not exist on your system. Code Genie cannot proceed. Please make sure that the directory <b><?php echo $thisGeneratePath; ?>