\n"; echo "\n"; echo "$title\n"; echo "\n"; echo "\n\n"; echo "\n\n"; echo "
"; echo ""; echo "
\"Kinotechnik.de\"

$ADVT_NAME

\n"; } function displayFooter() { echo "

\"Kinotechnikbeschreibungen "; echo "\"unser "; echo "\"Powered

\n"; echo "

Deutsche Version von F. Schiele, based on XGRA.COM 2001. All Rights Reserved.

\n\n"; echo "\n"; echo "\n"; exit; } function displayLocation( $id ) { global $cat, $PHP_SELF; $result = mysql_query( "SELECT cat_name, root_id, papa_id FROM category WHERE root_id=$id" ) or error( mysql_error() ); $row = mysql_fetch_array( $result ); if( $row['papa_id'] == 0 ) { if( $row['root_id'] == $cat ) $location = "Home :: {$row['cat_name']}"; else $location = "Home :: {$row['cat_name']}"; } else { if( $row['root_id'] == $cat ) $location = " > {$row['cat_name']}"; else $location = " > {$row['cat_name']}"; displayLocation( $row['papa_id'] ); } echo " $location\n"; } function displayLocationNoLink( $id ) { $result = mysql_query( "SELECT cat_name, root_id, papa_id FROM category WHERE root_id=$id" ) or error( mysql_error() ); $row = mysql_fetch_array( $result ); if( $row['papa_id'] == 0 ) $location .= $row['cat_name']; else { $location .= displayLocationNoLink( $row['papa_id'] ); $location .= " :: {$row['cat_name']}"; } return "$location"; } function findTotalAds( $id ) { $time = time(); $result = mysql_query( "SELECT root_id FROM category WHERE papa_id=$id" ) or error( mysql_error() ); if( mysql_num_rows( $result ) == 0 ) $totalAds += mysql_num_rows( mysql_query( "SELECT cat_id FROM ads WHERE cat_id=$id AND exp_date>$time" ) ); else while( $row = mysql_fetch_array( $result ) ) $totalAds += findTotalAds( $row['root_id'] ); return $totalAds; } function displayCat( $id ) { //display small cat root $result = mysql_query( "SELECT cat_name, root_id, papa_id FROM category WHERE root_id=$id" ) or error( mysql_error() ); $row = mysql_fetch_array( $result ); if( $row['papa_id'] == 0 ) $location = "Kategorie : {$row['cat_name']}"; else { $location = " > {$row['cat_name']}"; displayCat( $row['papa_id'] ); } echo " $location\n"; } function displayMoreCat() { global $cat, $PHP_SELF; $currentId = findCatRoot( $cat ); $result = mysql_query( "SELECT cat_name, root_id FROM category WHERE papa_id='' AND root_id!=$currentId" ) or error( mysql_error() ); echo "

 

\n"; echo "
\n"; echo "
\n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo "
Mehr Kategorien >
\n"; while( $row = mysql_fetch_array( $result ) ) echo "
  • {$row['cat_name']}
  • \n"; echo "
    \n"; echo "
    \n"; echo "
    \n"; } function findCatRoot( $id ) { $result = mysql_query( "SELECT root_id, papa_id FROM category WHERE root_id=$id" ) or error( mysql_error() ); $row = mysql_fetch_array( $result ); if( mysql_num_rows( $result ) != 0 ) findCatRoot( $row['papa_id'] ); return $row['root_id']; } function error( $error ) { displayHeader( "Error Page" ); echo "

    Error: $error\n"; echo "

    Back

    \n"; displayFooter(); mysql_close(); exit; } function verifyUser() { global $ADMIN_EMAIL; session_start(); global $email, $passwd; if( session_is_registered( "email" ) && session_is_registered( "passwd" ) ) { $result = mysql_query( "SELECT email, passwd FROM user WHERE email='$email' AND passwd LIKE BINARY '$passwd'" ) or error( "Login failed, please contact adminstrator" ); if( mysql_num_rows( $result ) == 1 ) return true; } return false; } function verifyAdmin() { session_start(); global $ADMIN_NAME, $ADMIN_PASS, $adminPasswd, $adminName; if( session_is_registered( "adminName" ) && session_is_registered( "adminPasswd" ) ) { if( $adminName == $ADMIN_NAME && $adminPasswd == $ADMIN_PASS ) return true; } return false; } function sentMail( $from, $to, $subject, $body ) { $headers = "MIME-Version: 1.0\r\n"; $headers .= "Content-type: text/html; charset=ios-8859-1\r\n"; $headers .= "From: {$from}\r\n"; $result = @mail( $to, $subject, $body, $headers ); if( $result ) return true; else return false; } function currentLocation( $id ) { $result = mysql_query( "SELECT cat_name, root_id, papa_id FROM category WHERE root_id=$id" ) or error( mysql_error() ); $row = mysql_fetch_array( $result ); if( $row['papa_id'] == 0 ) $location = "Home :: {$row['cat_name']}"; else { $location = " > {$row['cat_name']}"; currentLocation( $row['papa_id'] ); } echo " $location\n"; } function makeThumb( $scrFile, $dstFile, $dstW=120, $dstH=100 ) { $im = ImageCreateFromJPEG( $scrFile ); $srcW = ImageSX( $im ); $srcH = ImageSY( $im ); $ni = ImageCreate( $dstW, $dstH ); ImageCopyResized( $ni, $im, 0, 0, 0, 0, $dstW, $dstH, $srcW, $srcH ); ImageJPEG( $ni, $dstFile ); } ?>