Login   Register  
PHP Classes
elePHPant
Icontem

File: begin.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Valics Lehel  >  PHP or Java Class Code Generator  >  begin.php  >  Download  
File: begin.php
Role: Application script
Content type: text/plain
Description: app script
Class: PHP or Java Class Code Generator
Generate PHP or Java database access classes
Author: By
Last change:
Date: 2008-02-07 12:10
Size: 1,644 bytes
 

Contents

Class file image Download
<?php
include_once("config.inc.php");
include_once(
INCLUDE_PATH."cls_fast_template.php");
include_once(
INCLUDE_PATH."cls_string.php");
session_start();
$stringutil = new String("");
$all_url_vars=array();
$all_url_vars=$stringutil->parse_all();
$_SESSION["host"]=$all_url_vars["url"];
$_SESSION["logid"]=$all_url_vars["logid"];
$_SESSION["pasw"]=$all_url_vars["pasw"];
$_SESSION["dbname"]=$all_url_vars["dat"];
if(
$all_url_vars["action"] != "add")
{
$ft = new FastTemplate(TEMPLATE_PATH);
$ft->define(array("main"=>"template_body.html""content"=>"index.html"));
$ft->parse("BODY", array("content","main"));
$ft->FastPrint();
}
else if (
$all_url_vars["action"] == "add")
{
$ft = new FastTemplate(TEMPLATE_PATH);
$ft->define(array("main"=>"template_body.html""content"=>"template_table.html"));
$cid = @mysql_connect($all_url_vars["url"],$all_url_vars["logid"],$all_url_vars["pasw"]) or die("I cannot select the database because the database name does not exist!</br> Go back <a href='index.php?page=host'> prev</a>.</br> Write correct information!");
@
mysql_select_db($all_url_vars["dat"]) or die("I cannot select the database because the database name does not exist!</br> Go back <a href='index.php?page=host'> prev</a>.</br> Write correct information!");
$buffer ="";
$tres mysql_list_tables($all_url_vars["dat"]);
$num_rows mysql_num_rows($tres);
for (
$i 0$i $num_rows$i++)
{
  
$buffer.= "<option value=\"".mysql_tablename($tres$i)."\">".mysql_tablename($tres$i)."</option>";
 
}
}
$ft->assign("TABLES",$buffer);
$ft->parse("BODY", array("content","main"));
$ft->FastPrint();

?>