function _moduleContent(&$smarty, $module_name) { //include module files include_once "modules/{$module_name}/configs/default.conf.php"; include_once "modules/{$module_name}/libs/paloSantoRegistration.class.php"; load_language_module($module_name); //global variables global $arrConf; global $arrConfModule; $arrConf = array_merge($arrConf, $arrConfModule); //folder path for custom templates $base_dir = dirname($_SERVER['SCRIPT_FILENAME']); $templates_dir = isset($arrConf['templates_dir']) ? $arrConf['templates_dir'] : 'themes'; $local_templates_dir = "{$base_dir}/modules/{$module_name}/" . $templates_dir . '/' . $arrConf['theme']; //conexion resource $pDB = new paloDB($arrConf['dsn_conn_database']); $pDBACL = new paloDB($arrConf['elastix_dsn']['acl']); // dos bases de datos setting.db and register.db //actions $action = getAction(); $content = ""; switch ($action) { case "save": $content = saveRegister($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $pDBACL); break; case "getDataRegisterServer": $content = getDataRegistration($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $pDBACL); break; case "showAboutAs": $content = showFormAboutAs($smarty, $module_name, $local_templates_dir, $arrConf); break; case "showRPMS_Version": $content = showFormRPMS_Version($smarty, $module_name, $local_templates_dir, $arrConf); break; default: // view_form $content = viewFormRegister($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $pDBACL); break; } return $content; }
function save(){ } function register(){ window.location.href = "#registration"; } function relogin(){ window.location.href = "#login"; } </script> <?php if (isset($_POST['saveRegister'])) { saveRegister(); } function saveRegister() { $sql = $this->connection->query("INSERT INTO `user`(`userName`, `password`) VALUES ('jayson','osiris');"); echo "poop"; //$stmt->bind_param("ssi", $userName, $password) //window.location.href = "#login"; } function save() { $bills = $rent + $electric + $phone + $water + $cable + $car + $insurance + $creditCards + $loans + $other; $remaining = $pay - $bills; } ?> </head>