Test your vacancy "Web programmer"

It is necessary to solve at least one problem from each entry, the solution of all tasks is welcome! Deadline assignment: one week. The answer should send an e-mail: info@it-avenue.net with the theme "Vacancy programmer".

If we satisfied with your test implementation tasks, we assign an interview, which discussed in detail the terms of cooperation.

1. PHP

1.1 php-Write a script that would own conclusions code.

1.2 Dan array of "patterns", each element of which is an associative array types:
"Id" => / / unique numeric identifier template
"ParentId" => / / ID raditelskogo template, if any, otherwise 0
"Atribut" => / / part of the parent template (if any) to be replaced by the text of this template
"Text" => / / text of this template
There is a need to write a recursive function, which returns the text obtained replacement attribute template with ID allocated as a parameter, "embedded" in the parent template, which in turn invested in its parent, etc. template to having no parents.
Example array of patterns:
$ templates = array (
array ( "Id" => 1, "ParentId" => 0, "Atribut "=>""," Text" => "The root template / <% TITLE%>") ,
array ( "Id" => 2, "ParentId" => 1, "Atribut "=>"<% TITLE %>"," Text" => "First podshablon
<% CONTENT %>"),
array ( "Id" => 3, "ParentId" => 1, "Atribut "=>"<% TITLE %>"," Text" => "Second podshablon
<% CONTENT %>"),
array ( "Id" => 4, "ParentId" => 2, "Atribut "=>"<% CONTENT %>"," Text "=>"< b> Template 4 "),
array ( "Id" => 5, "ParentId" => 3, "Atribut "=>"<% CONTENT %>"," Text "=>"< b> Template 5 "),
array ( "Id" => 6, "ParentId" => 2, "Atribut "=>"<% CONTENT %>"," Text "=>"< b> Template 6 "),
array ( "Id" => 7, "ParentId" => 0, "Atribut "=>""," Text" => "The root template № 2")
)

2. PHP, MYSQL 2.1 Dany 2 files with log.
In 1 - om file on each line displayed attributes separated by 5 "|": the date, time, ip address, which came with URL, which went URL.
In 2 - om file on each line displayed 3 attribute separated symbol "|": ip a user's address, name of your browser, the name used OS.
We need to take data from these files and write to the database mysql.
Then with a single request to withdraw html-table with fields: ip address, browser, wasps, URL from which went the first time that URL which went last time, number of pages viewed unique URL, the total time on the site.

2.2 We need to withdraw form in which the user enters certain cells. and the following phrase: "In cells. phrase, you can use special characters: '*' - supersedes any combination of symbols; '?' -- Replaces one character. Thus the word 'gas *' there 'gas',' newspaper ',' soda ', etc. on the 'banner?' -- 'Banner', 'banner' but not 'banner' and 'banner'. "
After submitting the form you need to find and remove all records of a table with 1 text field containing cells. the phrase on the algorithm described above.

2.3 Implement storage mechanism variables sessions in PHP MySQL database

3. DHTML 3.1 Show "n" objects (such as pictures) that you could move around the screen using the mouse. Page when it should not be updated.
Is welcome if it will work in browsers IE c 5.0 and above, firefox c 1.5 and above, Opera c 7.5 and above

3.2 Propose option DHTML-wood, working in IE5 and above, Netscape6 and above, firefox c 1.5 and above, Opera c 7.5 and above. Sites should be disclosed without the need to update your browser window.

4. APACHE 4.1 There is a php script, vyvodyaschy values GET variable x var1, var2 and var3 lines of inquiry. There is a need to adjust Apache thus, that when you enter in a string query index-var1- - var2- - var3-. htm, run this script and conclusions of these values. Izpolzovat directives module mod_rewrite and file. Htaccess.

4.2 Using directives apache close access from the outside (the Internet) to a folder. Use file. Htaccess.