Archives

You are currently viewing archive for April 2007
Category: Web dev
Posted by: hajime osako
<html><head><title>test</title>
<style type='text/css'>
<!--
/*------mini box CSS----- */
.miniBox  { width:225px; }
.miniBoxTop  {  }
.miniBoxBtm  {  }

.miniBoxBody { padding: 5px; 
	background:url(/images/bg_Box.jpg) repeat-x left top; 
	background-position: 0px -6px; 
	border-left: 1px solid #CCCCCC; 
	border-right: 1px solid #CCCCCC; }
.cnrA { margin: 0 5px;height:1px;overflow: hidden; 
	background-color:#CCCCCC; }
.cnrB { margin: 0 3px;height:1px;overflow: hidden; 
	background:url(/images/bg_Box.jpg) repeat-x left top; 
	background-position: 1px 1px; 
	border-left: 1px solid #CCCCCC; 
	border-right: 1px solid #CCCCCC; }
.cnrC { margin: 0 2px;height:1px;overflow: hidden; 
	background:url(/images/bg_Box.jpg) repeat-x left top; 
	background-position: 1px -2px; 
	border-left: 1px solid #CCCCCC; 
	border-right: 1px solid #CCCCCC; }
.cnrD { margin: 0 1px;height:2px;overflow: hidden; 
	background:url(/images/bg_Box.jpg) repeat-x left top; 
	background-position: 1px -3px; 
	border-left: 1px solid #CCCCCC; 
	border-right: 1px solid #CCCCCC; }
.cnrW { margin: 0px;height:2px;overflow: hidden; 
	background-color:#FFFFFF; 
	border-left: 1px solid #CCCCCC; 
	border-right: 1px solid #CCCCCC; }
.cnrX { margin: 0 2 0 0px;height:1px;overflow: hidden; 
	background-color:#FFFFFF; 
	border-left: 1px solid #CCCCCC; 
	border-right: 1px solid #CCCCCC; }
.cnrY { margin: 0 3 0 0px;height:1px;overflow: hidden; 
	background-color:#FFFFFF; 
	border-left: 1px solid #CCCCCC; 
	border-right: 1px solid #CCCCCC; }
.cnrZ { margin: 0 5 0 0px;height:1px;overflow: hidden; 
	background-color:#CCCCCC; }
-->
</style>
</head>
<body bgcolor="#EEEEEE">
<div class="miniBox">
	<div class="miniBoxTop">
		<div class="cnrA"></div>
		<div class="cnrB"></div>
		<div class="cnrC"></div>
		<div class="cnrD"></div>
	</div>
	<div class="miniBoxBody">
	TEST TEST<br />
	TEST TEST<br />
	</div>
	<div class="miniBoxBtm">
		<div class="cnrW"></div>
		<div class="cnrX"></div>
		<div class="cnrY"></div>
		<div class="cnrZ"></div>
	</div>
</div> 
</body>
</html>

04/26: PHP framework

Category: Web dev
Posted by: hajime osako
symfony Web PHP framework
MVCなどはいいけど、PHP4では動かないのは残念。
Category: Web dev
Posted by: hajime osako
var dummyData = new Object;   
dummyData[0] = new Object;   
dummyData[0]['title'] = "";   
dummyData[0]['addr1'] = "";   
dummyData[0]['addr2'] = "";   
dummyData[0]['town'] = "";   
dummyData[0]['state'] = "";   
dummyData[0]['postcode'] = "";   
dummyData[0]['telephone'] = "";   
dummyData[0]['fax'] = "";   
dummyData[0]['hidden'] = "N";   
   
function fillRetailer(id)   
{   
	if(id>0) {   
		sendRequest("/heat/web/includes/retailerupload_xmlrpc.php", ("id="+id), callback);   
	}   
	else {   
		tempObj = dummyData[0];   
		fillForm(tempObj);   
	}   
}   
function callback(request) {   
	var tempObj;   
	eval("tempObj = "+request.responseText);	   
   
	if(!tempObj || tempObj=="") {   
		alert("No matching data for the selected retailer.");   
		return false;		   
	}	   
	   
	fillForm(tempObj);   
}   
function fillForm(obj) {   
	for (i in obj) {   
		if(document.getElementById(i))   
			document.getElementById(i).value = obj[i];   
	}   
}   

» Read More

Category: Web dev
Posted by: hajime osako
Copy the files ssleay32.dll and libeay32.dll from the OpenSSL folder to WINNT\System32.
You also need to download openssl.cnf into the same folder where you unzipped OpenSSL.
Download ssl.conf and place it in the Apache2/conf directory.

C:\Documents and Settings\HOsako>cd c:\Openssl
C:\Openssl>openssl req -config openssl.cnf -new -out my-server.csr
C:\Openssl>openssl rsa -in privkey.pem -out my-server.key <-- Delete passphrase
C:\Openssl>openssl x509 -in my-server.csr -out my-server.cert -req -signkey my-server.key -days 3650 <-- optional

Open the httpd.conf file and locate the LoadModule directives. Add
LoadModule ssl_module modules/mod_ssl.so

After </IfModule> add
#SSLMutex default
SSLRandomSeed startup builtin
SSLSessionCache none

In the VirtualHost directives add
<VirtualHost www.my-domain.com:443>
SSLEngine On
SSLCertificateFile C:/Openssl/my-server.cert
SSLCertificateKeyFile C:/Openssl/my-server.key
</VirtualHost>

Change ssl.conf
DocumentRoot "C:/Apache2/htdocs"
ServerName COMPUTER.local:443
ServerAdmin xxxxx@xxxxxx.com.au
SSLCertificateFile C:/Openssl/my-server.cert
SSLCertificateKeyFile C:/Openssl/my-server.key