} try { echo "Creating Session database.<br/>"; $sessionBP = BlueprintReader::read("Session.entity.xml"); $sessionDAO = new EntityDAO($sessionBP); $sessionDAO->create(); } catch(Exception $e) { echo "Exception: " . $e->getMessage() . "<br>"; } try { echo "Creating AuthFailedLoginAttempts database.<br/>"; $loginBP = BlueprintReader::read("AuthFailedLoginAttempts.entity.xml"); $loginDAO = new EntityDAO($loginBP); $loginDAO->create(); } catch(Exception $e) { echo "Exception: " . $e->getMessage() . "<br>"; } ?> </body> </html>
try { BlueprintWriter::write($bp); } catch (Exception $e) { $html .= "Caught Exception: " . $e->getMessage() . "<br>"; } // create database table $sqlDAO = new EntityDAO($bp); try { $html .= "Dropping table...<br>"; $sqlDAO->drop(); } catch (Exception $e) { $html .= "Caught Exception: " . $e->getMessage() . "<br>"; } try { $html .= "Creating table...<br>"; $sqlDAO->create(); } catch (Exception $e) { $html .= "Caught Exception: " . $e->getMessage() . "<br>"; } //$content[] = array("type"=>"html", "data"=>"<br><small>$html</small><br>"); // display blueprint alter form $blueprintSignature = $blueprintKey . ".entity.xml"; try { $action = "edit"; $blueprint = $blueprintKey; $bp = BlueprintReader::read($blueprintSignature); $content[] = array("type" => "html", "data" => "<h1>{$blueprintKey}</h1>"); $content[] = array("type" => "file", "data" => "alter.frm"); } catch (Exception $e) { $html = "An error occurred reading blueprint: {$blueprintSignature}"; $content[] = array("type" => "html", "data" => "{$html}");