雛形


  control.php




  

<?
# ************************************************
# 外部ファイル
# ************************************************
require_once( "global.php" );
require_once( "db.php" );
require_once( "model.php" );
require_once( "value.php" );

# ************************************************
# スクリプト固有の初期化
# ************************************************
	$VAL = new PgValue(10);

# ************************************************
# DB インスタンス
# ************************************************
	$SQL = new DB( "サーバ名", "データベース名", "sa", "" );

# ************************************************
# 処理コントロール
# ************************************************
	switch ( $_ENV["REQUEST_METHOD"] ) {
		case "GET":
			break;
		case "POST":
			break;
	}

# ************************************************
# ビュー
# ************************************************
	require_once( "view.php" );

# ************************************************
# 接続解除
# ************************************************
	$SQL->Close();

?>

  







  global.php

  

<?
# ************************************************
# HTTPヘッダの出力
# ************************************************
header( "Content-Type: text/html; Charset=shift_jis" );

?>

  

  db.php

  

<?	
# *************************************************
# データベースクラス
# *************************************************
class DB {

	var $Connect;
	var $Result;
	var $Field;
	var $Cols;
	var $Rows;

# *************************************************
# コンストラクタ
# *************************************************
	function DB( $Server, $DbName, $User, $Password ) {
		$this->Connect = mssql_connect( $Server, $User, $Password );
		mssql_select_db( $DbName, $this->Connect );
		$this->Cols = 0;
		$this->Rows = 0;
	}
# *************************************************
# クエリー
# *************************************************
	function Query( $SqlQuery ) {
		$this->Result = mssql_query( $SqlQuery, $this->Connect );
		if ( $this->Result == FALSE ) {
			$this->Cols = 0;
			$this->Rows = 0;
		}
		else {
			$this->Cols = mssql_num_fields( $this->Result );
			$this->Rows = mssql_num_rows( $this->Result );
		}
		return $this->Result;
	}
# *************************************************
# SQL実行
# *************************************************
	function Execute( $Sql ) {
		mssql_query( $Sql, $this->Connect );
	}
# *************************************************
# フェッチ			
# *************************************************
	function Fetch( ) {
		$this->Field = mssql_fetch_array( $this->Result );
		return $this->Field;
	}
# *************************************************
# フィールド名
# *************************************************
	function FieldName( $i ) {
		return mssql_field_name( $this->Result, $i );
	}
# *************************************************
# 開放
# *************************************************
	function Free( ) {
		mssql_free_result( $this->Result );
	}
# *************************************************
# 接続解除
# *************************************************
	function Close( ) {
		mssql_close( $this->Connect );
	}

}

?>

  

  model.php

  

<?
# ************************************************
# データセット
# ************************************************
function F_SetData( &$SQL, &$VAL ) {

}
# ************************************************
# 初期データ・カレントデータ
# ************************************************
function F_LoadDataInit( &$SQL, &$VAL ) {

}
# ************************************************
# 次データ
# ************************************************
function F_LoadDataNext( &$SQL, &$VAL ) {

}
# ************************************************
# 前データ
# ************************************************
function F_LoadDataPrev( &$SQL, &$VAL ) {

}
?>

  

  value.php

  

<?	
# ************************************************
# 変数クラス
# ************************************************
class PgValue {

	var $LineMax;

# ************************************************
# コンストラクタ
# ************************************************
	function PgValue( $nMax ) {

		$this->LineMax = $nMax;

	}

}
?>

  

  view.php

  

<HTML>
<HEAD>
<TITLE>
</TITLE>
<? require_once( "css.php" ) ?>
</HEAD>
<BODY>
</BODY>
</HTML>

  

  css.php

  

<STYLE type="text/css">

	body	{ 
		background-color:#c0c0c0;
	}

	h1	{ 
		color:#0000ff;
		font-size:26;
		font-family:Verdana,"MS Pゴシック";
	}

	th	{ 
		color:#ffffff;
		font-size:14;
		font-family:Verdana,"MS Pゴシック";
	}

	td	{ 
		color:#000000;
		font-size:12;
		font-family:Verdana,"MS Pゴシック";
	}

</STYLE>

  




yahoo  google  MSDN  MSDN(us)  WinFAQ  Win Howto  tohoho  ie_DHTML  vector  wdic  辞書  天気 


[PROphpLesson2]
Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
24/04/20 06:20:01
InfoBoard Version 1.00 : Language=Perl

1 BatchHelper COMprog CommonSpec Cprog CprogBase CprogSAMPLE CprogSTD CprogSTD2 CprogWinsock Cygwin GameScript HTML HTMLcss InstallShield InstallShieldFunc JScript JScriptSAMPLE Jsfuncs LLINK OldProg OracleGold OracleSilver PRO PRObrowser PROc PROconePOINT PROcontrol PROftpclient PROjscript PROmailer PROperl PROperlCHAT PROphp PROphpLesson PROphpLesson2 PROphpLesson3 PROphpfunction PROphpfunctionArray PROphpfunctionMisc PROphpfunctionString PROsql PROvb PROvbFunction PROvbString PROvbdbmtn PROvbonepoint PROwebapp PROwin1POINT PROwinSYSTEM PROwinYOROZU PROwindows ProjectBoard RealPHP ScriptAPP ScriptMaster VBRealtime Vsfuncs a1root access accreq adsi ajax amazon argus asp aspSample aspVarious aspdotnet aw2kinst cappvariety centura ckeyword classStyle cmaterial cmbin cmdbapp cmenum cmlang cmlistbox cmstd cmstdseed cmtxt cs daz3d db dbCommon dbaccess dnettool dos download flex2 flex3 flex4 framemtn framereq freeWorld freesoft gimp ginpro giodownload google hdml home hta htmlDom ie9svg install java javaSwing javascript jetsql jquery jsp jspTest jspVarious lightbox listasp listmsapi listmsie listmsiis listmsnt listmspatch listmsscript listmsvb listmsvc memo ms msde mysql netbeans oraPlsql oracle oracleWiper oraclehelper orafunc other panoramio pear perl personal pgdojo pgdojo_cal pgdojo_holiday pgdojo_idx pgdojo_ref pgdojo_req php phpVarious phpguide plsql postgres ps r205 realC realwebapp regex rgaki ruby rule sboard sc scprint scquest sdb sdbquest seesaa setup sh_Imagick sh_canvas sh_dotnet sh_google sh_tool sh_web shadowbox shgm shjquery shvbs shweb sjscript skadai skywalker smalltech sperl sqlq src systemdoc tcpip tegaki three toolbox twitter typeface usb useXML vb vbdb vbsfunc vbsguide vbsrc vpc wcsignup webanymind webappgen webclass webparts webtool webwsh win8 winofsql wmi work wp youtube