public function check_authentification() { // begin authenticate part if (AUTH_TYPE == 1) { if (!$AUTHENTICATE) { header("WWW-Authenticate: Basic realm=\"ADMIN " . CONF_SITE_NAME . "\""); header("HTTP/1.0 401 Unauthorized"); $ft = new FastTemplate(ADMIN_TEMPLATE_CONTENT_PATH); $ft->define(array("main" => "template_firstpage.html", "content" => "authentication_failed.html")); $ft->multiple_assign_define("LANG_"); $ft->multiple_assign_define("CONF_"); $ft->parse("BODY", array("content", "main")); $ft->showDebugInfo(ERROR_DEBUG); $ft->FastPrint(); exit; } } else { if (AUTH_TYPE == 2) { include_once INCLUDE_PATH . 'cls_session.php'; $sess = new MYSession(); if (!$sess->get(SESSION_ID)) { $sess->set('session_url_before', $_SERVER['REQUEST_URI']); header("Location: login.php"); exit; } } } // end authenticate part }
<?php include_once "./config.inc.php"; include_once INCLUDE_PATH . "cls_fast_template.php"; include_once INCLUDE_PATH . "cls_string.php"; include_once INCLUDE_PATH . "cls_xml.php"; include_once INCLUDE_PATH . "cls_session.php"; $stringutil = new String(); $session = new MYSession(); $field_types = array("primary", "key", "index", "unique", "fulltext", "foreign", "check"); $all_url_vars = $stringutil->parse_all(); $ft = new FastTemplate(TEMPLATE_PATH); $ft->define(array("main" => "template_body.html", "content" => "generate.html")); if (!empty($all_url_vars['table'])) { $all_url_vars['table'] = $stringutil->changeBRtoEnter($all_url_vars['table']); $all_url_vars['table'] = strtolower($all_url_vars['table']); $tok = explode(",", $all_url_vars['table']); //print_r($tok); //print $stringutil->changeBRtoEnter($all_url_vars['table']); exit; $toknr = sizeof($tok); $fpos = strpos($tok[0], "("); $firsttok = substr($tok[0], 0, $fpos); $firsttok = strtolower($firsttok); $firsttok = str_replace(" ", "", $firsttok); $firsttok = str_replace("createtable", "", $firsttok); if ($firsttok[0] == "`") { $firsttok = substr($firsttok, 1, strlen($firsttok)); } if ($firsttok[strlen($firsttok) - 1] == "`") { $firsttok = substr($firsttok, 0, strlen($firsttok) - 1); }
<?php include_once "../config.inc.php"; include_once INCLUDE_PATH . 'cls_session.php'; $sess = new MYSession(); include_once INCLUDE_PATH . "cls_fast_template.php"; include_once INCLUDE_LANGUAGE_PATH . $LANG . ".inc.php"; include_once INCLUDE_LANGUAGE_PATH . $LANG . ".admintool.inc.php"; include_once INCLUDE_PATH . "connection.php"; $stringutil = new String("nope"); $all_url_vars = array(); $all_url_vars = $stringutil->parse_all(); //$util=new Authenticate(); //$util->check_authentification(); if (empty($all_url_vars['action'])) { // unset session $url = $sess->get('session_url_before'); session_destroy(); //$sess = new MYSession(); $sess->set('session_url_before', $url); $ft = new FastTemplate(ADMIN_TEMPLATE_CONTENT_PATH); $ft->define(array("main" => "template_firstpage.html", "content" => "login.html")); $ft->assign("MESSAGE", $all_url_vars['message']); $ft->multiple_assign_define("LANG_"); $ft->multiple_assign_define("CONF_"); $ft->parse("BODY", array("content", "main")); $ft->showDebugInfo(ERROR_DEBUG); $ft->FastPrint(); } else { if ($all_url_vars['userid'] == USER && $all_url_vars['password'] == PASSWORD) { $sess->set(SESSION_ID, SESSION_ID);
FILE MADE BY: Valics Lehel PROJECT: CodeFaster DESCRIPTION: This file will create all the HTML and PHP file, except the class. ====================================== */ include_once "./config.inc.php"; //include_once (INDEX_PATH . "public_html/config.inc.php"); //include_once (INDEX_PATH . "public_html/include/connection.php"); include_once INCLUDE_PATH . "cls_xml.php"; include_once INCLUDE_PATH . "cls_fast_template.php"; include_once INCLUDE_PATH . "cls_string.php"; include_once INCLUDE_PATH . "cls_session.php"; //include_once (INCLUDE_PATH . "PhpBeautifier.inc.php"); $stringutil = new String(); $session = new MYSession(); $xml = new Xml(); $all_url_vars = $stringutil->parse_all(); $action = $all_url_vars["action"]; $items = $all_url_vars['items']; /** * @author - Kiss Szilard * @desc - * @vers - 1.0 **/ $functions = $session->get("functions", $functions); $fields = $session->get("fields", $fields); $projectname = $session->get("projectname"); $author = $session->get("author"); $date = $session->get("date"); $name = $session->get("name");
include_once "./config.inc.php"; include_once INCLUDE_PATH . "cls_fast_template.php"; include_once INCLUDE_PATH . "cls_string.php"; include_once INCLUDE_PATH . "cls_session.php"; //include_once(INCLUDE_PATH."PhpBeautifier.inc.php"); function process_lang_item($name, $replacement_lang) { $remain = strlen($name) - strlen("_en"); if (substr($name, $remain) === "_en") { $name = substr($name, 0, $remain) . '_' . $replacement_lang; return $name; } else { return $name; } } $session = new MYSession(); $stringutil = new String(); $all_url_vars = $stringutil->parse_all(); // basic values if (!isset($all_url_vars['type'])) { $all_url_vars['type'] = "php"; } //print $all_url_vars['genfromsql']; $session->set("name", $all_url_vars['name']); // classname not specified if (!isset($all_url_vars['classname'])) { if ($all_url_vars['type'] == "php" or $all_url_vars['type'] == "php5") { $all_url_vars['classname'] = "cls_" . strtolower($all_url_vars['name']) . ".php"; } else { $all_url_vars['classname'] = $all_url_vars['name'] . ".java"; }