HORSEBACK RIDING IN PLAKIAS, CRETE


CRETE HORSE RIDING IN PLAKIAS CRETE
A tourist and sports web site that offers horse riding and riding lessons in the amazing beaches and countryside in the area of Plakias, in south Crete.


Technologies: HTML, CSS, Javascript, PHP.

PHP Error: cannot modify header information headers already sent

Text editors sometimes insert a UTF-8 byte order mark at the top of a file. In this case, the error message will usually say that "output started" at line 1 of some file. To fix this, configure your text editor to save the file without a byte order mark.

For example, in Macromedia Dreamweaver go to
Modify > Page Properties > Title/Encoding and uncheck Include Unicode Signature

Insert "zero" values in AUTONUMBER field in mySQL

Στη mySQL όταν θέλει κανείς να εισάγει ένα dump script και έχει πίνακες με τιμές 0 σε πεδία που είναι auto_number, τότε διαπιστώνει κανείς ότι δεν δέχεται την τιμή 0,
βάζει αυτόματα - κατά την εκτέλεση του dump - αντί για 0 το 1 και στη συνέχεια χτυπούν τα PKs.

Αυτό που μπορεί να κάνει κανείς είναι να «πειράξει» το sql-mode της mySQL.

Από το αρχείο my.ini (windows) ή my.cnf (linux) προσθέτοντας
στην παράμετρο sql-mode, την τιμή NO_AUTO_VALUE_ON_ZERO ( η τιμή της μεταβλητής είναι μια λίστα από παραμέτρους
της mySQL που η παρουσία τους τις ενεργοποιεί)
όπως φαίνεται παρακάτω:

sql-mode="...,NO_AUTO_VALUE_ON_ZERO"

Κάνεις restart την mySQL, τρέχεις το dump και εφόσον όλα είναι ΟΚ μπορείς να επαναφέρεις την παράμετρο sql-mode
στην αρχική της μορφή.

How to protect your email from span in a website

EMAIL OBFUSCATOR
http://www.jottings.com/obfuscator/

Search Engine Rating Factors

  • Keyword Use in Title Tag
  • Anchor Text of Inbound Link
  • Global Link Popularity of Site
  • Age of Site
  • Link Popularity within the Site'
  • Topical Relevance of Inbound Link
  • Link Popularity of Site in Topic
  • Keyword Use in Body Text
  • Global Link Popularity of Linkin
  • Topical Relationship of Linking

Click SEOMoz to view the entire article.

ELECTRONIC DOCUMENTS MANAGEMENT SYSTEM



ELECTRONIC DOCUMENTS MANAGEMENT SYSTEM

It fulfills all the requirements for document management of a large company or organization. It supports multi-users and multi-departments simultaneously).


ΗΛΕΚΤΡΟΝΙΚΟ ΠΡΩΤΟΚΟΛΛΟ ΕΓΓΡΑΦΩΝ.

Υποστηρίζει πλήρως τη λειτουργικότητα ενός πρωτοκόλλου με τη διαχείριση ηλεκτρονικών εγγράφων (εισαγωγή με μοναδικό αριθμό πρωτοκόλλου, επεξεργασία και ορισμός των χαρακτηριστικών κάθε εγγράφου, υποστήριξη συνημμένων αρχείων κ.λπ.), την αρχειοθέτηση και τους μηχανισμούς αναζήτησης βάσει κριτηριών που έχει ορίσει ο χρήστης. Υποστηρίζει πολλαπλό αριθμό χρηστών και πολλαπλό αριθμό διαφορετικών Τμημάτων-Υπηρεσιών.


Technologies: HTML, CSS, Javascript, Ajax, Java, Struts and mySQL.

A SAFETY MANAGEMENT SYSTEM FOR SMALL AND MID ENTERPRICES



A web application for safety management and analyris for SMEs.

Technologies: HTML, CSS, Javascript, JSP, MySQL

LOANS COLLECTION WEB APPLICATION


LOANS COLLECTION MANAGEMENT SYSTEM

Loans Collection Management Web Application for Banks or Insurances

ΔΙΑΔΙΚΤΥΑΚΗ ΕΦΑΡΜΟΓΗ ΔΙΑΧΕΙΡΙΣΗΣ ΚΑΘΥΣΤΕΡΟΥΜΕΝΩΝ ΠΛΗΡΩΜΩΝ

Σύστημα παρακολούθησης και διαχείρισης καθυστερούμενων πληρωμών (π.χ. πιστοδοτήσεων δανείων, δόσεων αγορών κ.λπ.), βασισμένο σε πλήρως παραμετροποιημένες πολιτικές
διαχείρισης των καθυστερούμενων πληρωμών και πολιτικές ανάθεσης των πληρωμών στους
κατάλληλους υπαλλήλους.
Υποστηρίζει μεγάλο αριθμό χρηστών.




Technologies: HTML, CSS, Javascript, Java, JSP, mySQL, Aythentication and authorization mechanisms.

CRETE HOLIDAY VILLAS



A new website about Holidays in Crete, using HTML, CSS, PHP and mySQL.



Click Crete Villas to view the website

CAR RENTAL IN RHODES


A web site for a car rental company in Rhodes. HTML, CSS and JavaScript technologies.


Click Rhodes Car Rental to visit the web site

Mina Valyrakis Papatheodorou Web Site



Mina Valyrakis Papatheodorou is a greek artist.
Technologies: HTML, CSS, PHP, mySQL

Click Mina Valyrakis-Papatheodorou to visit the web site.

Fast Movers Transportation Web Site




Fast Movers is a transportation company in Crete, Greece.

Technologies: HTML, CSS, PHP, mySQL

Disable Enter to submit a form

Add the script
onKeyPress="return event.keyCode!=13"
in the BODY of the HTML document for all the web page,

OR

1. Disable in the form the submit.

<nested:form action="docMgmt"
onsubmit="return false;" styleId="my_form"/>

2. Creta a function that submit a from in your js script.
function submitFrm(objId){
var theform = document.getElementById(objId);
theform.submit();
return true;
}

3. call the above function from the submit button...
<nested:submit onclick="submitFrm('my_form');">Submit!!</nested:submit>

See the original view:
http://kreotekdev.wordpress.com/2007/11/16/disabling-the-enter-key-on-forms-using-javascript/

AJAX AutoSuggest with Parameters in Greeks

Usage of the following control:
http://www.brandspankingnew.net/archive/2006/08/ajax_auto-suggest_auto-complete.html

Some changes in Javascript bsn.AutoSuggest_2.1.3_comp.js in order to support Greek language.

Replace twice the
encodeURIComponent(this.sInp)
with
encodeURI(encodeURI(this.sInp))

Read the greek parameters using in a java bean the following code:
try {
request.setCharacterEncoding("UTF-8");
nm = request.getParameter("nm");
nm = java.net.URLDecoder.decode (nm, "UTF-8");
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}

Struts 1.x + Ajax + Greek Language (UTF-8)

In order to support UTF-8 (greek characters) in the parameters of a URI with AJAX, you have to do the following steps:

1. In the AJAX .js file, the function that requests data from the server...

function getDataFrom(str){
str = trim(str);

if ( str.length==0 ) {
document.getElementById(your_id).value = "";
return;
}

// 1. Create the XmlHttp Object
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null){
alert ("Your browser does not support AJAX!");
return;
}

var url="your_struts_url_action.do?do=a&nm=" + str;

// SOS - Call twice the encoding function...
url = encodeURI (url);
url = encodeURI (url);

// 2. Event handler when readystate changes....
xmlHttp.onreadystatechange=your_function;

// 3. Request info from the db
xmlHttp.open("GET",url,true);
xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=utf-8");
xmlHttp.send(null);
}


Step 2: In the Action that you call from the AJAX function above, read the parameter and decode it:

try {
request.setCharacterEncoding("UTF-8");
name = request.getParameter("nm");
name = java.net.URLDecoder.decode ( sYphresia, "UTF-8");
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}

mySQL - UTF-8 for JSP and Tomcat

How to display UTF-8 characters in Tomcat using MySQL as the data source!

1. Make sure your MySQL database is using the UTF-8 character set.

2.Tell the JDBC connector that it has to talk to the database using UTF-8.
To do this add useUnicode=true&characterEncoding=UTF-8 to the connection URL in the JDBC configuration. Your connection URL will look something like this: jdbc:mysql://localhost:3306/mydatabase?useUnicode=true&characterEncoding=UTF-8.

3. Make sure the browser knows that what it's receiving is actually UTF-8.
In your JSP files add <%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>at the top.
In your Servlets, make sure the right HTTP headers are sent back to the client by adding the line response.setContentType("text/html;charset=UTF-8");.
Of course, you'll have to use another MIME type than text/html if you're not going to display HTML.

4. Tell Java that you're using UTF-8 by configuring the Java options.
Add the parameter -Dfile.encoding=UTF-8 to your Java options, either in the catalina.bat file or by clicking on the Java tab in the Monitor Tomcat program.

5. if you're using Struts to handle web forms - is to make sure all input from the client is converted to UTF-8.
This is done with a little bit of coding and a configuration change

http://www.vegard.net/archives/bg000815.php

Format dates and numbers

public String FD(String strDate){
// Converts a date from 1900-01-01 to 01-01-1900 and vice versa ....
if ( strDate != null ) {
String newDate[];
String strNewDate = "";
int indx =0;

newDate = strDate.split("-",3);


for (indx = 2; indx >=0; indx-- )

strNewDate = strNewDate + newDate[indx] + "-";
return(strNewDate.substring(0, strNewDate.length() - 1));
}
else
return ("");
}

public String FC(String strMoney){
// Converts a string from 00000000,00 to 00.000.000.000,00

if ( strMoney != null ) {
BigDecimal amount = new BigDecimal(strMoney);

NumberFormat nf = NumberFormat.getInstance();
nf.setMinimumFractionDigits(2);
nf.setMaximumFractionDigits(2);
String res = nf.format(amount);
return( res );
}
else
return ("");
}

Struts 1.x: How to output HTML string from an ActionForm paramete

We have the following ActionForm

public class DocListForm extends ActionForm {
private String multiPagesHtml = "your HTML string .....";
}

Then, in the jsp file we can use the following:
<bean:write name="docListForm" property="multiPagesHtml" filter="false"/>

with FILTER = FALSE

in order to display the HTML output of the multiPagesHTML

mySQL: UPSERT (INSERT OR UPDATE) between 2 tables

In order to INSERT new rows or UPDATE if the rows exist you can use the following SQL:

Step 1:
INSERT INTO PRODUCT_T (ID, NAME, DESCR)

SELECT T2.ID, T2.NAME, T2.DESCR FROM
(IMP_PRODUCT_T T2 LEFT OUTER JOIN PRODUCT_T T1 ON T2.ID = T1.ID)
WHERE T1.ID IS NULL;

Step 2:
UPDATE PRODUCT_T T1
INNER JOIN IMP_PRODUCT_T T2 ON T1.ID = T2.ID
SET T1.NAME = T2.NAME, T1.DESCR = T2.DESCR


Note: It has poor efficiency but it is standards compliant!!!

Struts 1.x with multipart form and UTF-8

In order to bypass the problem with UTF-8 character set in a multi-part form,
you have to create a new class ScyllaRequestProcessor that overwrites
the default controller RequestProcessor.

Step 1: Create a new class:

public class ScyllaRequestProcessor extends RequestProcessor {

public void process(HttpServletRequest request, HttpServletResponse
response) throws IOException,
ServletException {
try {
request.setCharacterEncoding("UTF-8");
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
super.process(request, response);
}
}

Step 2: Update the processorClass in struts-config.xml
<controller processorClass="tuc.isc.eprot.services.ScyllaRequestProcessor" />

MyEclipse with Tomcat: Bad version number in .class file

The above error occurs when the MyEclipse Compiler uses different version of JRE in relation with the Tomcat JRE version.

Please, for the MyEclipse check:
Windows > Preferences > Java
1. Compiler
2. Installed JREs

For the Apache Tomcat check in MyEclipse Server View:
Apache TOmcat > Configuration > Tomcat > Tomcat 5.x > JDK