Beispiel #1
0
function getGETPOST($var)
{
    return isset_or($_GET[$var], isset_or($_POST[$var], ''));
}
Beispiel #2
0
?>
>List With Us</a></li>
					<li><a href="myAccount" <?php 
echo route(0) == 'myAccount' ? 'class="active"' : '';
?>
>My Account<?php 
if ($new_messages > 0) {
    ?>
<span class="notification"><?php 
    echo $new_messages;
    ?>
</span><?php 
}
?>
</a></li>

				</ul>
			</div>
		</div>
	</div><!-- header -->
	<div id="divider"></div><!-- divider -->
	
    <div id="lwu">
    	<img src="/images/lwu.png" alt="List With Us!">
    </div>
    <div class="modal hidden" id="db">
    	<?php 
echo nl2br(isset_or($query));
?>
    </div>
Beispiel #3
0
				var options = { 
				target:        '#emailListingContent',   // target element(s) to be updated with server response 
				beforeSubmit:  showRequest,  // pre-submit callback 
				success:       showResponse  // post-submit callback 
				}; 
				// bind form using 'ajaxForm' 
				$("#emailListingForm").validationEngine({promptPosition : "bottomRight", scroll: false});
				$("#emailListingForm").validationEngine('attach');
				$('#emailListingForm').ajaxForm(options);
			}
			

			$("#contactSubmit").click(function() {
				if($("#contact_form").validationEngine('validate')) {
					// <?php 
if (isset_or($_SESSION['logged_in'])) {
    ?>
					// return true;
					// <?php 
} else {
    ?>
					// $('body').append('<div id="fade"></div>'); //Add the fade layer to bottom of the body tag.
					// $('#fade').css({'filter' : 'alpha(opacity=60)'}).fadeIn(); //Fade in the fade layer - .css({'filter' : 'alpha(opacity=80)'}) is used to fix the IE Bug on fading transparencies 
					// $("#loginForm").slideDown(100);
					// return true;
					// <?php 
}
?>
					return true;
				}
			});
Beispiel #4
0
							var newHeight = $('#reply').closest('.panels')[0].scrollHeight;
							$('#reply').closest('.panels').animate({height: newHeight});
							
							return false;
						});
					});
				}
				return false;
			});
			$('#add_reply').click(function() {
				alert('hi!');
				$('#reply').fadeIn();
				return false;
			});
			<?php 
if (isset_or($_REQUEST['inquiry_id'])) {
    ?>
			$('#inquiry').load("ajax/inquiry.php?id=<?php 
    echo $_REQUEST['inquiry_id'];
    ?>
", function() {
				$('#add_reply').click(function() {
					
					
					$('#reply').slideDown();
					var newHeight = $('#reply').closest('.panels')[0].scrollHeight;
					$('#reply').closest('.panels').animate({height: newHeight});
					
					return false;
				});
			});
Beispiel #5
0
function decode($string, $key)
{
    $key = sha1($key);
    $strLen = strlen($string);
    $keyLen = strlen($key);
    $hash = "";
    for ($i = 0; $i < $strLen; $i += 2) {
        $ordStr = hexdec(base_convert(strrev(substr($string, $i, 2)), 36, 16));
        if (isset_or($j) == $keyLen) {
            $j = 0;
        }
        $ordKey = ord(substr($key, $j, 1));
        $j++;
        $hash .= chr($ordStr - $ordKey);
    }
    return $hash;
}
		    	<br><br>
		    	<ul class="tickmark spaced" style="margin-left:5px;margin-right:5px">
                	<li>Keep track of all the businesses you have inquired on</li>
                    <li>Create watchlists of businesses you are interested in</li>
                    <li>Save searches so you can came back to them later</li>
                    <li>Be alerted of new listings made available</li>
                    <li>And more!</li>
                </ul>
                <br>
                To complete the free account registration, please choose a password below.
                <br><br>
                <form>
                <div class="gridform contact">
                	<label for="email">Email Address</label>
                	<span class="contact" style="float:right;margin-top:2px;"><?php 
    echo isset_or($_REQUEST['email']);
    ?>
</span>
                	
                	<label for="password">Password</label>
                	<input type="password" name="password" class="contact">
                	
                	
              	</div>
               	<input type="submit" class="button_green floatright last-child" value="Submit">
	            </form>
		    </div>
		</div><!-- contact -->
		<?php 
}
?>
Beispiel #7
0
?>

	<div id="content">
		
    	<div class="content-box login" style="margin:auto;width:500px;margin-top:30px;padding:0;overflow:visible">
    		<?php 
if (isset_or($_REQUEST['message'])) {
    ?>
<h6 style="margin-left:30px;margin-top:20px;margin-bottom:-15px"><?php 
    echo stripslashes($_REQUEST['message']);
    ?>
</h6><?php 
}
?>
    		<form action="<?php 
echo isset_or($_SESSION['referrer']) ?: '/login';
?>
" id="loginForm" method="post">
	    	<div class="lightform autowidth big" style="margin:30px;padding-bottom:60px;display:block;">
	 

		    		<input type="email" name="user_email" placeholder="E-mail" class="validate[required,custom[email]]">

		    		<input type="password" name="user_password" placeholder="Password" class="floatright validate[required]">
		    		<br style="clear:both">
		    		<input type="hidden" name="referrer" value="<?php 
echo $_SESSION['referrer'];
?>
">
					<input type="submit" name="submit" value="Log In" class="blocklink last-child floatright" style="margin-top: 20px;margin-bottom:15px;margin-right:8px;padding: 10px 14px">
	    	</div>
Beispiel #8
0
<?php

$stylesheets = array("css/validationEngine.jquery.css");
$scripts = array("js/jquery.validationEngine.js", "js/jquery.validationEngine-en.js", "js/jquery.form.js");
$title = "Register";
include "head.php";
?>

	<div id="content">
		<div class="content-box" style="margin-left:200px;width:600px;">
			<div class="graybar top"><div class="sector last-child" style="font-size:17px">Register for your free account</div></div>
    		<?php 
echo isset_or($message);
?>
    		<?php 
if (!isset_or($registered)) {
    ?>
    		<form action="/ajax/forms.php" id="registrationForm" method="post">
	    	<div class="lightform big" style="margin-left:30px;margin-top:15px;width:260px;">
	 			
	    		<input type="text" name="fname" placeholder="First Name" class=" validate[required,custom[onlyLetterSp]]" style="width:120px;">
	    		<input type="text" name="lname" placeholder="Last Name" class=" validate[required,custom[onlyLetterSp]]" style="width: 120px;float:right">
	    		
	    		
	    		<input type="email" name="email" placeholder="Email Address" class=" validate[required,custom[email]]" style="width: 260px;margin-bottom:0px">
	    		<div id="emailCheck" style="width:260px;height:40px;line-height:40px;padding-left:10px;display:block;">
	    			<span class="hidden emailTaken" style="color:red;">Email taken. <a href="#">Forgot Password?</a></span>
	    		</div>
	    		<input type="password" name="password" placeholder="Password" class=" validate[required]" style="width:260px">
	    		
	    		
					</tr>
				
					<tr>
						<td style="vertical-align:top">Body</td>
						<td><textarea name="email_body" style="width: 500px;height: 400px"><?php 
echo isset_or($editing->body);
?>
</textarea></td>
					</tr>
    			</table>
    			
    				
    				
    				<input type="hidden" name="edit_template" value="true">
    				<input type="hidden" name="template_id" value="<?php 
echo isset_or($editing->id);
?>
">
    				<input type="submit" class="button_green clear offset floatright last-child" style="padding: 10px 25px;" value="Save">
    			</form>
    			</div>
    			<div class="green-block floatright">
    				<h4>Tag Guidelines</h4>
    				<table>
    					<?php 
foreach ($template_fields as $field_name => $field_desc) {
    ?>
    					<tr>
    						<td class="paddingbottom"><strong><?php 
    echo $field_name;
    ?>
Beispiel #10
0
				function() {
					$("#businessmap").attr('src', "images/businessmap.png");
					//$('#businessmap-holder').fadeIn('fast');
					//$("#businessmap").attr('src', "images/map_overlay/holder.png").fadeOut('fast');
					//$('#map-container').css('background','url(images/businessmap.png) no-repeat');
				});
				
			$("#industries").change(function() {
			
				
				var options = [];
				<?php 
while ($category = $db->fetchNextObject($sub_categories)) {
    ?>
				<?php 
    if (isset_or($cpid) != $category->parent_id) {
        $cpid = $category->parent_id;
        ?>
					options[<?php 
        echo $category->parent_id;
        ?>
] += '<option value="">Select a Segment</option>';
				<?php 
    }
    ?>
					options[<?php 
    echo $category->parent_id;
    ?>
] += '<option value="<?php 
    echo $category->id;
    ?>
Beispiel #11
0
    $listing_id = mysql_real_escape_string($_POST['listing_id']);
    foreach ($_POST as $key => $value) {
        if (in_array($key, $listing_fields)) {
            $input_values[] = $key . "='" . isset_or(mysql_real_escape_string(stripslashes($_POST[$key]))) . "'";
        }
    }
    $insert_data = implode(",", $input_values);
    $query = "UPDATE listings SET {$insert_data} WHERE id = '{$listing_id}'";
    $result = $db->query($query);
    if ($result) {
        echo showAlert("Your listing has been updated!", "positive");
    } else {
        echo showAlert("There was a problem updating your listing.", "negative");
    }
}
if (isset_or($_REQUEST['doListingContact'])) {
    // get the listing id and the user_id of person who listed it
    $listing_id = mysql_real_escape_string($_REQUEST['listing_id']);
    $name = mysql_real_escape_string($_REQUEST['name']);
    $email = mysql_real_escape_string($_REQUEST['email']);
    $phone = mysql_real_escape_string($_REQUEST['phone']);
    $message = mysql_real_escape_string($_REQUEST['message']);
    $listing_info = $db->queryUniqueObject("SELECT l.headline, u.* FROM listings l\n\t\t\t\t\t\t\t\t\t\t\tLEFT JOIN users u ON u.id = l.user_id\n\t\t\t\t\t\t\t\t\t\t\tWHERE l.id = '{$listing_id}'");
    $user_exists = $db->queryUniqueValue("SELECT id FROM users WHERE email = '{$email}'");
    $emailTemplate = new EmailTemplate();
    // Create an instance for new user from contact form
    if ($user_exists == null) {
        // user doesn't exist so add them
        if (strpos($name, " ") != false) {
            list($fname, $lname) = explode(" ", $name);
        } else {
<?php

require_once "../includes/config.inc.php";
require_once "../includes/functions.php";
// Create database class instance and connect to db
require_once "../classes/class.Database.php";
$db = new DB($db_name, $db_host, $db_user, $db_password);
// Pull captcha functions
$cryptinstall = "../crypt/cryptographp.fct.php";
require_once $cryptinstall;
$email_listing_id = mysql_real_escape_string($_REQUEST['email_listing_id']);
$from = $_REQUEST['y_email'];
$email = $_REQUEST['d_email'];
if (isset_or($_REQUEST['share_listing']) && $email_listing_id != "" && $from != "" && $email != "" && isset_or($_REQUEST['captcha']) != "") {
    $listing_title = $db->queryUniqueValue("SELECT headline FROM listings WHERE id='{$email_listing_id}'");
    if (chk_crypt($_REQUEST['captcha'])) {
        $subject = 'BusinessFieds: ' . $listing_title;
        $body = '
		<html>
		<head>
		  <title>BusinessFieds Shared Listing</title>
		</head>
		<body>
		  <p>' . $_REQUEST['y_email'] . ' has forwarded you this <a href="http://www.businessfieds.com" target="_blank">BusinessFieds.com</a> listing.</p>
		  <p>Please see below for more information</p>
		  <p>Visit the posting at <a href="http://www.businessfieds.com/listing/' . $_REQUEST['email_listing_id'] . '" target="_blank">http://www.businessfieds.com/listing/' . $_REQUEST['email_listing_id'] . '</a>
		  to contact the seller</p>
		  <p>Thank you,<br>BusinessFieds</p>
		</body>
		</html>
		';
Beispiel #13
0
    $existing_user = $db->queryUniqueValue("SELECT id FROM users WHERE email='{$email}' AND active=0");
    if ($existing_user != null) {
        $query = "UPDATE users SET active=1 WHERE email = '{$email}'";
        $db->execute($query);
        $message = '<p style="margin:20px;font-size: 15px"><strong>Thank you!</strong>
					<br><br>Your account has been activated. <a href="/login">Sign In &raquo;</a></p>';
    } else {
        $message = '<p style="margin:20px;font-size: 15px">This link is either invalid or the account is already active.</p>';
    }
}
$title = "Activation";
include "head.php";
?>

	<div id="content">
    	<div class="content-box login" style="margin:auto;width:500px;margin-top:30px;padding:0;overflow:visible">
    		<div class="graybar top"><div class="sector last-child" style="font-size:17px">Activation Complete</div></div>
    		<?php 
echo isset_or($message);
?>
	    	<br style="clear:both">
	    </div>
    	
    </div>
    <script>
		$(document).ready(function() {
			
		});
	</script>
    <?php 
include "foot.php";
Beispiel #14
0
<?php

$business_types = $db->query("SELECT c.id parent_id, c.name parent_name, c2.id child_id, c2.name child_name\n\t\t\t\t\t\t\t\t\tFROM  categories c\n\t\t\t\t\t\t\t\t\tLEFT JOIN categories c2 ON c.id = c2.parent_id\n\t\t\t\t\t\t\t\t\tWHERE c.parent_id = 0");
while ($business_type = $db->fetchNextObject($business_types)) {
    $categories[$business_type->parent_id]['name'] = $business_type->parent_name;
    $categories[$business_type->parent_id]['sub_cat'][$business_type->child_id] = $business_type->child_name;
}
if (route(1) == 'step2') {
    foreach ($_POST as $key => $value) {
        ${$key} = mysql_real_escape_string($value);
    }
    $seller_financing = isset_or($seller_financing) == '1' ?: '0';
    $relocatable = isset_or($relocatable) == '1' ?: '0';
    $franchise = isset_or($franchise) == '1' ?: '0';
    $home_based = isset_or($home_based) == '1' ?: '0';
    $type = $_REQUEST['ad_type'];
    $spotlight = $type == 'spotlight' ? '1' : '0';
    $price = $type . '_price';
    $price = 2 * $db->queryUniqueValue("SELECT value FROM settings WHERE name = '{$price}'");
    $query = "INSERT INTO listings (user_id, country, state, county, city, type, spotlight, category_id, sub_category_id, headline, description, asking_price, seller_financing, gross_rev, gross_rev_comments, cash_flow, cash_flow_comments, inventory_value, inventory_included, ffe_value, ffe_included, realestate_value, realestate_included, second_category_id, second_sub_category_id, seller_financing_desc, year_established, num_employees, relocatable, franchise, home_based, mgmt_training, sell_reason, facilities, market_outlook, keywords, active)\n\t\t\t\t\tVALUES ('{$u_id}','{$country}','{$state}','{$county}','{$city}','{$type}','{$spotlight}','{$category_id}','{$sub_category_id}','{$headline}','{$description}','{$asking_price}','{$seller_financing}','{$gross_rev}','{$gross_rev_comments}','{$cash_flow}','{$cash_flow_comments}','{$inventory_value}','{$inventory_included}','{$ffe_value}','{$ffe_included}','{$realestate_value}','{$realestate_included}','{$second_category_id}','{$second_sub_category_id}','{$seller_financing_desc}','{$year_est}','{$num_emp}','{$relocatable}','{$franchise}','{$home_based}','{$training}','{$sell_reason}','{$facilities}','{$competition}','{$keywords}','0')";
    //$db->query($query);
}
switch (route(1)) {
    case 'standard':
        $ad_type = 'standard';
        break;
    case 'featured':
        $ad_type = 'featured';
        break;
    case 'spotlight':
        $ad_type = 'spotlight';
Beispiel #15
0
<?php

if (isset_or($_REQUEST['updateContactSettings'])) {
    foreach ($_REQUEST['setting'] as $key => $value) {
        $key = mysql_real_escape_string($key);
        $value = mysql_real_escape_string($value);
        $result[] = $db->query("UPDATE settings SET value = '{$value}' WHERE name = '{$key}'");
    }
    if (!in_array('0', $result)) {
        $alerts[] = showAlert("Settings updated successfully!", "alert_positive");
    } else {
        $alerts[] = showAlert("There was a problem updating settings", "alert_negative");
    }
}
$groups = $db->query("SELECT group_id,name FROM user_groups");
if (isset_or($_REQUEST['permSave'])) {
    foreach ($_REQUEST['permissions'] as $group_id => $whatever) {
        //echo $group_id;
        // drop the groups shit
        $db->query("DELETE FROM user_groups_permissions WHERE group_id = '{$group_id}'");
        foreach ($_REQUEST['permissions'][$group_id] as $permission_id => $active) {
            //echo $group_id.">".$permission_id ."\n";
            $result = $db->query("INSERT INTO user_groups_permissions (group_id, permission_id) VALUES ('{$group_id}','{$permission_id}')");
        }
    }
    if ($result) {
        $alerts[] = showAlert("Permissions updated", "alert_positive");
    }
}
$permission_files = $db->query("SELECT name FROM permissions");
while ($filename = $db->fetchNextObject($permission_files)) {
Beispiel #16
0
echo $total_listings;
?>
</b> listing(s)
					<span class="floatright">
						Page:
						<?php 
for ($i = 1; $i <= $number_of_pages; $i++) {
    ?>
	                    <a href="/listings/<?php 
    echo isset_or($hash);
    ?>
&page=<?php 
    echo $i;
    ?>
" class="blocklink<?php 
    echo isset_or($page) == $i ? " active" : "";
    echo $i == $number_of_pages ? " last-child" : "";
    ?>
"><?php 
    echo $i;
    ?>
</a>
	                   	<?php 
}
?>
	                </span>
				</div>
				<br style="clear:both">
			</div><!-- listings -->
			<br style="clear:both">
		</div><!-- content-box -->
Beispiel #17
0
    foreach ($permissions_array as $permissions_array_single) {
        $u_permissions[] = $permissions_array_single['name'];
    }
} else {
    $u_permissions[] = "admin";
}
require_once "includes/arrays.php";
// email template fields array
$template_fields = array("activation_url" => "url for new users to activate their accounts", "listing_headline" => "headline for the business listing", "inquiry_message" => "message", "inquiry_url" => "link to view message", "inquirer_name" => "name of the person who filled out the contact form");
if (isset_or($u_id)) {
    $new_messages = $db->queryUniqueValue("SELECT count(id) FROM messages WHERE to_id = '{$u_id}' AND `read` ='0'");
}
if (isset($route_array[0]) && $route_array[0] != "") {
    if (in_array($route_array[0], $u_permissions) || $u_all_access == 1) {
        if (file_exists($u_group_name . "/" . $route_array[0] . ".php")) {
            include $u_group_name . "/" . $route_array[0] . ".php";
        } else {
            include "_default/" . $route_array[0] . ".php";
        }
    } elseif ($_SESSION['logged_in']) {
        include "_default/no_access.php";
    } else {
        if (isset_or($_GET['inquiry_id'])) {
            $_SESSION['referrer'] = isset_or($_GET['rt']);
            $_SESSION['referrer'] .= '&inquiry_id=' . $_GET['inquiry_id'] . '#inquiry';
        }
        Header("Location: /login");
    }
} else {
    include "_default/home.php";
}
Beispiel #18
0
function getGETPOST($var, $default)
{
    return isset_or($_GET[$var], isset_or($_POST[$var], $default));
}