################################################################################################
#
#  project           	: Logix Classifieds
#  filename          	: pictureviewer.php
#  last modified by  	:
#  e-mail            	: support@phplogix.com
#  purpose           	: View Picture
#
#################################################################################################
#  Include Configs & Variables
#################################################################################################
require "library.php";
#  The Head-Section
#################################################################################################
window_header("Picture");
#  The Main-Section
#################################################################################################
if (!$_SESSION[suserid] && !$bazarfreeread) {
    include "{$language_dir}/nologin.inc";
} else {
    echo "<center>";
    if ($_GET[pic] && !$_GET[id]) {
        echo "<img src=\"{$_GET['pic']}\" border=\"0\">";
    } elseif (!$_GET[pic] && $_GET[id]) {
        echo "<img src=\"picturedisplay.php?id={$_GET['id']}\" border=\"0\">";
    } else {
        echo "NO PICTURE AVAILIABLE";
    }
    echo "</center>";
}
#################################################################################################
#
#  project           	: Logix Classifieds
#  filename          	: classified_my_del.php
#  last modified by  	:
#  e-mail            	: support@phplogix.com
#  purpose           	: Delete AD's
#
#################################################################################################
#  Include Configs & Variables
#################################################################################################
require "library.php";
#  HTML Header Start
#################################################################################################
window_header($admy_delete);
if (!$_SESSION[suserid]) {
    include "{$language_dir}/nologin.inc";
} else {
    #  Get Entrys for current page
    #################################################################################################
    if ($adid && $confirm) {
        // Delete AD
        $result = mysql_query("SELECT * FROM " . $prefix . "ads WHERE id={$adid}");
        $db = mysql_fetch_array($result);
        if ($db[userid] == $_SESSION[suserid] || $_SESSION[susermod]) {
            // Subtract Counter in userdata-DB
            mysql_query("update " . $prefix . "userdata set ads=ads-1 where id='{$db['userid']}'") or died("Database Query Error");
            // Subtract Counter in adcat-DB
            mysql_query("update " . $prefix . "adcat set ads=ads-1 where id='{$db['catid']}'") or died("Database Query Error");
            // Subtract Counter in adsubcat-DB
#################################################################################################
#
#  project           	: Logix Classifieds
#  filename          	: favorits.php
#  last modified by  	:
#  e-mail            	: support@phplogix.com
#  purpose           	: Add Ad to Favorits
#
#################################################################################################
#  Include Configs & Variables
#################################################################################################
require "library.php";
#  The Head-Section
#################################################################################################
window_header("Favorits");
#  The Main-Section
#################################################################################################
if (!$_SESSION[suserid] || !$adid && !$deladid) {
    include "{$language_dir}/nologin.inc";
} else {
    echo "<div class=\"mainheader\">{$favorits_header}</div>\n";
    echo "<div class=\"maintext\"><br><center>\n";
    if ($deladid) {
        $query = mysql_query("delete from " . $prefix . "favorits where adid='{$deladid}' AND userid='{$_SESSION['suserid']}'") or died("Database Query Error");
        echo "{$favorits_del}<br>\n";
        echo "<br><form action=javascript:window.opener.location.reload();window.close() METHOD=POST>\n";
        echo "<input type=submit value={$close}></form>\n";
    } elseif ($adid) {
        $query = mysql_query("SELECT * FROM " . $prefix . "favorits WHERE userid={$_SESSION['suserid']} AND adid={$adid}") or died("Database Error");
        $result = mysql_num_rows($query);
#################################################################################################
#
#  project           	: Logix Classifieds
#  filename          	: passphrase.php
#  last modified by  	:
#  e-mail            	: support@phplogix.com
#  purpose           	: Passphrase Function
#
#################################################################################################
#  Include Configs & Variables
#################################################################################################
require "library.php";
#  Main-Section
#################################################################################################
if ($enteredsecret && $catid) {
    $md5secret = md5($enteredsecret);
    $cookietime = $timestamp + $passphrase_cookie_time * 3600;
    setcookie("Passphrase_{$catid}", "{$md5secret}", $cookietime, "{$cookiepath}");
    setcookie("PassphraseUser_{$catid}", "{$userid}", $cookietime, "{$cookiepath}");
    // close window
    echo "<SCRIPT language=Javascript>opener.location.href=opener.location.href;window.close();</script>";
} elseif ($catid) {
    window_header($pass_head);
    echo "<div class=\"mainheader\">{$pass_head}</div>\n";
    echo "<br>\n";
    echo "<table align=\"center\" width=\"100%\">\n";
    echo "<form enctype=\"text\" action={$_SERVER['PHP_SELF']} METHOD=POST>\n\t<div class=\"maininputleft\"><center>\n        <input type=text name=\"enteredsecret\" value=\"\">\n        <input type=hidden name=\"userid\" value=\"{$userid}\">\n\t<input type=hidden name=\"catid\" value=\"{$catid}\"><br><br>\n        <input type=submit value={$submit}></center></div>\n";
    echo "</form>\n";
    window_footer();
}
#################################################################################################
#
#  project           	: Logix Classifieds
#  filename          	: sendmail.php
#  last modified by  	:
#  e-mail            	: support@phplogix.com
#  purpose           	: Sending Mail's
#
#################################################################################################
#  Include Configs & Variables
#################################################################################################
require "library.php";
#  The Head-Section
#################################################################################################
window_header("SendMail");
#  The Main-Section
#################################################################################################
if (strpos($client, "MSIE")) {
    // Internet Explorer Detection
    $field_height2 = "6";
    $field_size = "50";
} else {
    $field_height2 = "4";
    $field_size = "30";
}
if (!$floodprotect2 && $floodprotect) {
    $floodprotect2 = $floodprotect;
}
if ($logging_enable && $floodprotect2 && $floodprotect_mail && $_SESSION[suserid] && !$_SESSION[susermod]) {
    // check floodprotect
#################################################################################################
#
#  project           	: Logix Classifieds
#  filename          	: classified_notify_del.php
#  last modified by  	:
#  e-mail            	: support@phplogix.com
#  purpose           	: Delete notify categories
#
#################################################################################################
#  Include Configs & Variables
#################################################################################################
require "library.php";
#  The Head-Section
#################################################################################################
window_header("Notify");
#  The Main-Section
#################################################################################################
if (!$_SESSION[suserid]) {
    include "{$language_dir}/nologin.inc";
} else {
    #  Get Entrys for current page
    #################################################################################################
    if ($delid && $confirm) {
        // Delete
        $result = mysql_query("SELECT * FROM " . $prefix . "notify WHERE subcatid='{$delid}' AND userid='{$_SESSION['suserid']}'");
        $db = mysql_fetch_array($result);
        if ($db) {
            mysql_query("delete from " . $prefix . "notify WHERE subcatid='{$delid}' AND userid='{$_SESSION['suserid']}'") or died("Database Query Error");
            echo "<div class=\"mainheader\">{$notifydel_head}</div>\n";
            echo "<br>\n";
#################################################################################################
#
#  project           	: Logix Classifieds
#  filename          	: smiliehelp.php
#  last modified by  	:
#  e-mail            	: support@phplogix.com
#  purpose           	: Show's the Smilie DB
#
#################################################################################################
#  Include Configs & Variables
#################################################################################################
require "library.php";
#  The Head-Section
#################################################################################################
window_header("Smilies");
#  The Main-Section
#################################################################################################
if (!$_SESSION[suserid]) {
    include "{$language_dir}/nologin.inc";
} else {
    echo "<table>\n";
    echo "<tr>\n";
    echo "<td><div class=\"maininputleft\">Code</div></td>\n";
    echo "<td></td>\n";
    echo "<td><div class=\"maintext\"></div></td>\n";
    echo "</tr>\n";
    $result = mysql_query("SELECT * FROM " . $prefix . "smilies") or died("Query Error");
    while ($db = mysql_fetch_array($result)) {
        echo "<tr>\n";
        echo "<td><div class=\"maininputleft\">{$db['code']}</div></td>\n";
<?php

#################################################################################################
#
#  project           	: Logix Classifieds
#  filename          	: message.php
#  last modified by  	:
#  e-mail            	: support@phplogix.com
#  purpose           	: Show clear Text ErrorMessage in a popup-window
#
#################################################################################################
#  Include Configs & Variables
#################################################################################################
require "library.php";
#  The Head-Section
#################################################################################################
window_header($msgheader);
#  The Main-Section
#################################################################################################
echo "<body bgcolor=\"{$bgcolor}\">\n";
echo "<div class=\"mainheader\">" . strtoupper($msgheader) . "</div>\n";
echo "<div class=\"maintext\"><br><center>\n";
echo "{$msgheader} : " . stripslashes($msg) . "<br>\n";
echo "<br><form action=javascript:window.close() METHOD=POST>\n";
echo "<input type=submit value={$close}></form></center>\n";
echo "</div>\n";
#  The Foot-Section
#################################################################################################
window_footer();
#################################################################################################
#
#  project           	: Logix Classifieds
#  filename          	: classified_my_del.php
#  last modified by  	:
#  e-mail            	: support@phplogix.com
#  purpose           	: Delete AD's
#
#################################################################################################
#  Include Configs & Variables
#################################################################################################
require "library.php";
#  HTML Header Start
#################################################################################################
window_header($admy_move);
if (!$_SESSION[suserid]) {
    include "{$language_dir}/nologin.inc";
} else {
    #  Get Entrys for current page
    #################################################################################################
    if ($adid && $catid && $subcatid && $confirm && $admovecat) {
        // Move Ad
        if ($sales_option) {
            if (!sales_checkaccess(2, $_SESSION[suserid], $catid)) {
                // check access for user and cat
                echo "<script language=javascript>window.close();</script>";
                open_sales_window();
                exit;
            }
        }