//------------------- VARIABLE ------------------------------------
$pic_source="./photos/";
error_reporting(0);
/*
$database='kunstgalerievienna';
$dbuser='root';
$dbpwd='';
*/
$database='usrdb_kunstebz_kunstgalerie';
$dbuser='kunstebz';
$dbpwd='MBeU6a3j@!';
$host='localhost';
mysql_connect($host,$dbuser,$dbpwd) || die ("Es konnte keine Datenbankverbindung aufgebaut werden !");
mysql_select_db($database);
$mainav="index.php";
//-------------------------- ENDE VARIABLE------------------------
require('./globals.php');
$domain = ($_SERVER["HTTP_HOST"]);
// print $domain;
if ($domain == "www.artgallery-vienna.eu" or $domain == "artgallery-vienna.eu")
{
header("Location: http://kunstgalerie-vienna.at?lang=en");
//print "DAMN";
//header("Location: http://www.artgallery-vienna.eu?lang=en");
}
global $get_ce_id,$lang,$thix;
require('./layout_base.php');
//----------------------------FUNCTIONS--------------------------------
function printnav($criteria_id,$criteria_name,$lang)
{
$result=mysql_query("select a.* from creator a, object b where a.creator_id = b.creator_id and b.criteria_id = '$criteria_id' group by a.name order by a.name");
if ($row = mysql_fetch_array($result))
{
print " ";
}
}
}
//---------------------ENDE FUNCTION NAVAUSGABE--------------------------------
//-----------------------FUNCTION COUNT---------------------------------------
function getid($ce_id,$ci_id,&$get_ce_id)
{
$result4=mysql_query("select a.* from creator a, object b where a.creator_id = b.creator_id and b.criteria_id = '$ci_id' group by a.name order by a.name");
if ($row4 = mysql_fetch_array($result4))
{
$countname=0;
do
{
$countname+=1;
$namecounter[$countname]=$row4["creator_id"];
//print $row4["creator_id"];
}
while($row4 = mysql_fetch_array($result4));
}
$get_count=0;
for (;;)
{
$get_count=$get_count+1;
$get_id = $namecounter[$get_count];
if ($get_id == $ce_id)
{
$get_count+=1;
$get_ce_id = $namecounter[$get_count];
break;
}
else if ($get_count == '100')
{
break;
}
}
}
//---------------------------ENDE FUNCTION COUNT-------------------------------------
//---------------FUNCTION NAVIGATION-------------------------------------------------
function navigation(&$lang)
{
print "
";
}
//----------------------ENDE FUNCTION NAVIGATION---------------------------------------
// ----------------- FUNKTION ____ NAVIGATION EVENTS-----------------------------------
function shownavevents($lang,$date,$host,$dbuser,$dbpwd,$future_name,$past_name)
{
@// mysql_connect($host,$dbuser,$dbpwd) || die ("Es konnte kein Datenbankverbindung aufgebaut werden !");
// mysql_select_db($database);
$result=mysql_query("select * from events order by date_search");
$row = mysql_fetch_array($result);
$date = date(Ymd);
$count_array = 0;
$count1_array = 0;
do
{
$date_search=$row["date_old_search"];
$date_origin=$row["date"];
if ($date < $date_search)
{
$count_array = $count_array + 1 ;
$future_counter[$count_array] = $date_origin;
}
else if ($date >= $date_search)
{
$count1_array = $count1_array + 1 ;
$past_counter[$count1_array] = $date_origin;
}
}
while($row = mysql_fetch_array($result));
print " ";
print " ";
}
//-------------- ENDE FUNKTION EVENTS NAV---------------------------------------
//-------------------------------------------------------------------------------------
//-------------------------ANFANG DES HAUPTTEILS---------------------------------------
print $header;
if($nav == 'events'){
$events_link = 'HOME';
} else{
$events_link = 'EVENTS';
}
$event_pic1 = "onmouseover=\"movepic('pic1','images/events_over.gif')\" onmouseout=\"movepic('pic1','images/events.gif')\"";
$event_pic2 = "onmouseover=\"movepic('pic1','images/events_over.gif')\" onmouseout=\"movepic('pic1','images/events_active.gif')\"";
$events_handler = "";
$events_handler1 = "";
// mysql_connect($host,$dbuser,$dbpwd) || die ("Es konnte kein Datenbankverbindung aufgebaut werden !");
// mysql_select_db($database);
$result_new = mysql_query("select * from events order by date_old_search desc");
$row_new = mysql_fetch_array($result_new);
$date_new = date(Ymd);
$date_search_new=$row_new["date_old_search"];
$date_origin_new=$row_new["date"];
if ($date_new < $date_search_new)
{
$event_new=$events_handler1;
$event_script=$event_pic2;
}
else if ($date_new >= $date_search_new)
{
$event_new=$events_handler;
$event_script=$event_pic1;
}
if ($nav == 'events')
{
$event_script = "";
}
if ($lang == 'en')
{
//print "ON";
$page_url=$REQUEST_URI;
$page_url=eregi_replace('\?lang=en',"", $page_url);
$page_url=eregi_replace("&lang=en","", $page_url);
$page_url=eregi_replace("lang=en","", $page_url);
//$language="DEUTSCH";
$language="DEUTSCH";
$contact="CONTACT";
$contact1="IMPRESSUM";
$background = "back_en.jpg";
$write_next="<< NEXT";
$write_back="BACK >>";
$future_name = "UPCOMING EVENTS";
$past_name = "PAST EVENTS";
if ($nav == 'events')
{
$events_navigation = "?nav=new&lang=en";
$events="HOME";
}
else if ($nav != 'events')
{
$events_navigation = "?nav=events&lang=en";
$events=$event_new;
}
}
else if ($lang != 'en')
{
//print "IN";
$background = "back_de.jpg";
$page_url=$REQUEST_URI;
if ($page_url!= '/')
{
if (!isset($nav))
{
$page_url.="?lang=en";
}
else
{
$page_url.="&lang=en";
}
$language="ENGLISH";
$events=$event_new;
$background = "back_de.jpg";
$contact="KONTAKT";
$contact1="IMPRESSUM";
$write_next="<< WEITER";
$write_back="ZURÜCK >>";
$future_name = "KOMMENDE EVENTS";
$past_name = "VERGANGENE EVENTS";
if ($nav == 'events')
{
$events_navigation = "?nav=new";
$events="HOME";
}
else if ($nav != 'events')
{
$events_navigation = "?nav=events";
$events=$event_new;
}
}
else if ($lang == '')
{
//$language="ENGLISH";
$language="ENGLISH";
$events=$event_new;
$contact="KONTAKT";
$contact1="IMPRESSUM";
$write_next="<< WEITER";
$write_back="ZURÜCK >>";
$future_name = "KOMMENDE EVENTS";
$past_name = "VERGANGENE EVENTS";
if ($nav == 'events')
{
$events_nav = "";
$events="HOME";
}
else if ($nav == '')
{
$events_navigation = "?nav=events";
$events=$event_new;
}
}
}
//----------------------------------HAUPTNAVIGATION----------------------
if ($nav=='search')
{
// $AA1PRINT = $table_part1;
if ($next=="") $next=0;
$currentx=$thix;
if ($thix=="") $thix=0;
$thix=$thix+1;
$last_next = $next;
$show_next=0;
$count_pic=0;
$pic_witdh_count = 5;
@// mysql_connect($host,$dbuser,$dbpwd) || die ("Es konnte keine Datenbankverbindung aufgebaut werden !");
// mysql_select_db($database);
$result = mysql_query("select * from object where creator_id = '$ce_id' and criteria_id = '$ci_id' limit $next, 20");
// print $ce_id.$ci_id."o";
$result_2 = mysql_query("select * from creator where creator_id = '$ce_id'");
$row_name = mysql_fetch_array($result_2);
$k_name = $row_name["name"];
$k_date = $row_name["data"];
if ($row = mysql_fetch_array($result))
{
do {
$bild_klein=$row["pic_small"];
$bild_id=$row["id"];
$big_width=$row["big_width"];
$big_height=$row["big_height"];
$bild_klein=$row["pic_small"];
//$text=$row["picture_text"];
//$text_1=nl2br($text);
//----------------- AUSGABE DER BILDER ---- VERGRSSERUNG ------- TEXT AUSGABE------
//print "";
//print "";
//-------------------------ENDE AUSGABE DER BILDER----------------------------------
$pic_width=$row["small_height"];
if ($big_height <= 445)
{
$big_height = 445;
}
$big_height1=$big_width+80;
$big_width1=$big_height+40;
if ($lang=='en')
{
$array_1 = "";
}
else
{
$array_1 = "";
}
$pic_width_count = $pic_width_count + $pic_width+5;
if ($pic_width_count >= 595)
{
$show_next=1;
break;
}
$next = $next +1;
$count_pic=$count_pic+1;
$print_pic[$count_pic]=$array_1;
}
while($row = mysql_fetch_array($result));
}
$AA1.= $table_pictures1;
$picture_space_x = $pic_width_count;
if ($show_next=='1')
{
$picture_space_x = $pic_width_count - $pic_width+5;
}
$picture_space = 589 - $picture_space_x;
if ($picture_space >= 30)
{
$picture_space_neu = $picture_space - 5 ;
$AA1.= "