$pdo = new PDO("mysql:dbname=fazerbrasil", "root", ""); // imac // $pdo = new PDO("mysql:dbname=test", "root", ""); /************************************************************ * Bootstraping TotalFlex * --------------------------------------------------------- * This code is needed every initialization of the * application. There is, in te future, ideas to make this * part of one simple SQLite database that will only need * one line to bootstrap it all. *************************************************************/ // Initializing Total Flex with callback url/method and the target database connection info // 'index.php?callback=1', 'POST', 'sqlite:business.db3' // 10*40* // $result = $pdo->query("SELECT * FROM business_entity"); TotalFlex::setDefaultDB($pdo); $TotalFlex = new TotalFlex(); // tambem pode-se passar o $pdo como parametro para o construtor do TF // $TotalFlex = new TotalFlex ( $pdo ); // DEFAULT TEMPLATE TO BE COMPATIBLE WITH BOOTSTRAP ################################################################# \TotalFlex\Field\Field::setDefaultEncloseStart("<div class=\"col-md-6 form-group\">\n"); \TotalFlex\Field\Field::setDefaultEncloseEnd("</div>\n"); \TotalFlex\Field\Field::setDefaultTemplate("\t<input class=\"form-control\" type=\"__type__\" name=\"__name__\" id=\"__id__\" value=\"__value__\"/><br>\n\n"); \TotalFlex\Field\Select::setDefaultTemplate("\t<select class=\"form-control\" name=\"__name__\" id=\"__id__\" >\n__options__\n</select>\n\n"); // ################################################################################## ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title>