/**
* @project ApPHP Business Directory
* @copyright (c) 2011 ApPHP
* @author ApPHP <*****@*****.**>
* @license http://www.gnu.org/licenses/
*/
// *** Make sure the file isn't accessed directly
defined('APPHP_EXEC') or die('Restricted Access');
//--------------------------------------------------------------------------
if (!$objLogin->IsLoggedIn() && ModulesSettings::Get('customers', 'allow_registration') == 'yes') {
    draw_title_bar(_REGISTRATION_CONFIRMATION);
    echo $msg;
    echo '<div class="pages_contents">';
    if (!$confirmed) {
        echo '<br />
		<form action="index.php?customer=confirm_registration" method="post" name="frmConfirmCode" id="frmConfirmCode">
			' . draw_token_field(false) . '
			' . draw_hidden_field('task', 'post_submission', false) . '
		
			' . _ENTER_CONFIRMATION_CODE . ':			
			<input type="text" name="c" id="c" value="" size="27" maxlength="25" /><br /><br />
			<input class="form_button" type="submit" name="btnSubmit" id="btnSubmit" value="Submit">						
		</form>
		<script type="text/javascript">appSetFocus("c")</script>';
    }
    echo '</div>';
} else {
    draw_title_bar(prepare_breadcrumbs(array(_CUSTOMER => '', _REGISTRATION_CONFIRMATION => '')));
    draw_important_message(_NOT_AUTHORIZED);
}
Example #2
0
<?php

// *** Make sure the file isn't accessed directly
defined('APPHP_EXEC') or die('Restricted Access');
//--------------------------------------------------------------------------
if (Modules::IsModuleInstalled('payments') && ModulesSettings::Get('payments', 'is_active') == 'yes') {
    draw_title_bar(prepare_breadcrumbs(array(_MY_ACCOUNT => '', _ADVERTISE => '', _ORDER_CANCELED => '')));
    draw_content_start();
    draw_message(_ORDER_WAS_CANCELED_MSG, true, true);
    draw_content_end();
} else {
    draw_important_message(_NOT_AUTHORIZED);
}
Example #3
0
    ?>
	<div style="padding:5px 0;">
	<?php 
    $msg = '<div style="padding:9px;min-height:250px">';
    $welcome_text = _WELCOME_CUSTOMER_TEXT;
    $welcome_text = str_replace('_FIRST_NAME_', $objLogin->GetLoggedFirstName(), $welcome_text);
    $welcome_text = str_replace('_LAST_NAME_', $objLogin->GetLoggedLastName(), $welcome_text);
    $welcome_text = str_replace('_TODAY_', _TODAY . ': <b>' . format_datetime(@date('Y-m-d H:i:s'), '', '', true) . '</b>', $welcome_text);
    $welcome_text = str_replace('_LAST_LOGIN_', _LAST_LOGIN . ': <b>' . format_datetime($objLogin->GetLastLoginTime(), '', _NEVER, true) . '</b>', $welcome_text);
    $welcome_text = str_replace('_HOME_', _HOME, $welcome_text);
    $welcome_text = str_replace('_EDIT_MY_ACCOUNT_', _EDIT_MY_ACCOUNT, $welcome_text);
    $welcome_text = str_replace('_MY_LISTINGS_', _MY_LISTINGS, $welcome_text);
    $welcome_text = str_replace('_ADVERTISE_', _ADVERTISE, $welcome_text);
    $welcome_text = str_replace('_ORDERS_PAGE_DESCR_', Modules::IsModuleInstalled('payments') == 'yes' ? _DASHBOARD_ORDERS_LINK : '', $welcome_text);
    $welcome_text = str_replace('_INQUIRIES_PAGE_DESCR_', Modules::IsModuleInstalled('inquiries') == 'yes' ? _DASHBOARD_INQUIRIES_LINK : '', $welcome_text);
    $msg .= $welcome_text;
    $msg .= '<p><br /></p>';
    $msg .= '</div>';
    draw_message($msg, true, false);
    ?>
    </div>
<?php 
} else {
    if ($objLogin->IsLoggedIn()) {
        draw_title_bar(prepare_breadcrumbs(array(_GENERAL => '')));
        draw_important_message(_NOT_AUTHORIZED);
    } else {
        draw_title_bar(prepare_breadcrumbs(array(_CUSTOMER => '')));
        draw_important_message(_MUST_BE_LOGGED);
    }
}
Example #4
0
/**
* @project ApPHP Business Directory
* @copyright (c) 2011 ApPHP
* @author ApPHP <*****@*****.**>
* @license http://www.gnu.org/licenses/
*/
// *** Make sure the file isn't accessed directly
defined('APPHP_EXEC') or die('Restricted Access');
//--------------------------------------------------------------------------
$listing_type = Application::Get('type');
$listing_type_title = '';
if ($listing_type == 'featured') {
    $listing_type_title = _FEATURED_LISTINGS;
} else {
    if ($listing_type == 'recent') {
        $listing_type_title = _RECENT_LISTINGS;
    }
}
draw_title_bar(prepare_breadcrumbs(array(_LISTINGS => '', $listing_type_title => '')));
if (!empty($listing_type_title)) {
    if ($listing_type == 'featured') {
        Listings::DrawFeaturedAll();
    } else {
        if ($listing_type == 'recent') {
            Listings::DrawRecentAll();
        }
    }
} else {
    draw_important_message(_PAGE_UNKNOWN);
}
Example #5
0
$email = isset($_POST['email']) ? prepare_input($_POST['email']) : '';
$msg = '';
if ($act == 'resend') {
    if (!$password_sent) {
        if (Customers::Reactivate($email)) {
            $msg = draw_success_message(str_replace('_EMAIL_', $email, _ACTIVATION_EMAIL_WAS_SENT), false);
            Session::Set('activation_email_resent', true);
        } else {
            $msg = draw_important_message(Customers::GetStaticError(), false);
        }
    } else {
        $msg = draw_message(_ACTIVATION_EMAIL_ALREADY_SENT, false);
    }
}
// Draw title bar
draw_title_bar(_RESEND_ACTIVATION_EMAIL);
// Check if customer is logged in
if (!$objLogin->IsLoggedIn() && ModulesSettings::Get('customers', 'allow_registration') == 'yes') {
    echo $msg;
    ?>
	<div class="pages_contents">
	<form action="index.php?customer=resend_activation" method="post">
		<?php 
    draw_hidden_field('act', 'resend');
    ?>
		<?php 
    draw_hidden_field('type', 'customer');
    ?>
		<?php 
    draw_token_field();
    ?>
Example #6
0
<?php

/**
* @project ApPHP Business Directory
* @copyright (c) 2011 ApPHP
* @author ApPHP <*****@*****.**>
* @license http://www.gnu.org/licenses/
*/
// *** Make sure the file isn't accessed directly
defined('APPHP_EXEC') or die('Restricted Access');
//--------------------------------------------------------------------------
$objCategory = Categories::Instance();
$objListings = Listings::Instance();
$category_info = $objCategory->GetLevelsInfo(Application::Get('category_id'));
$button = '';
if (Modules::IsModuleInstalled('inquiries')) {
    $listings_locations = isset($_REQUEST['listings_locations']) ? (int) $_REQUEST['listings_locations'] : '';
    $listings_sub_locations = isset($_REQUEST['listings_sub_locations']) ? (int) $_REQUEST['listings_sub_locations'] : '';
    if (!empty($category_info['first']['id'])) {
        $button = '<input type="button" class="form_button" value="' . _SUBMIT_INQUIRY . '" onclick="appGoToPage(\'index.php?page=inquiry_form\',\'&inquiry_category=' . $category_info['first']['id'] . '&visitor_locations=' . $listings_locations . '&visitor_sub_locations=' . $listings_sub_locations . '\',\'post\')">';
    }
}
draw_title_bar(prepare_breadcrumbs(array(_CATEGORIES => prepare_link('categories', '', '', 'all', _SEE_ALL, '', '', true), $category_info['third']['name'] => $category_info['third']['link'], $category_info['second']['name'] => $category_info['second']['link'], $category_info['first']['name'] => '')), $button);
$objCategory->DrawSubCategories(Application::Get('category_id'), 'listings');
$objListings->DrawListings(Application::Get('category_id'));
Example #7
0
<?php

/**
* @project ApPHP Business Directory
* @copyright (c) 2011 ApPHP
* @author ApPHP <*****@*****.**>
* @license http://www.gnu.org/licenses/
*/
// *** Make sure the file isn't accessed directly
defined('APPHP_EXEC') or die('Restricted Access');
//--------------------------------------------------------------------------
// Draw title bar
draw_title_bar(prepare_breadcrumbs(array(_ACCOUNTS => '', _ADMIN_LOGIN => '')));
// Check if admin is logged in
if (!$objLogin->IsLoggedIn()) {
    if ($objLogin->IsWrongLogin()) {
        draw_important_message($objLogin->GetLoginError());
    }
    ?>
	<div class="pages_contents">
	<form action="index.php?admin=login" method="post">
		<?php 
    draw_hidden_field('submit_login', 'login');
    ?>
		<?php 
    draw_hidden_field('type', 'admin');
    ?>
		<?php 
    draw_token_field();
    ?>
		
Example #8
0
 /**
  * Draw page title
  * 		@param $additional_text
  */
 public function DrawTitle($additional_text = '', $draw = true)
 {
     $output = '';
     if (isset($this->page['page_title'])) {
         $page_title = decode_text($this->page['page_title']);
         $output = draw_title_bar($page_title, $additional_text, false);
     }
     if ($draw) {
         echo $output;
     } else {
         return $output;
     }
 }
                    }
                }
            }
        }
        // Start main content
        draw_title_bar(prepare_breadcrumbs(array(_LISTINGS_MANAGEMENT => '', _CATEGORY_DESCRIPTION => '', $category_info_name => '', ucfirst($action) => '')), prepare_permanent_link('index.php?admin=mod_categories&cid=' . (int) $cid, _BUTTON_BACK));
        echo $msg;
        draw_content_start();
        if ($mode == 'view') {
            $objCategoryDescr->DrawViewMode();
        } else {
            if ($mode == 'add') {
                $objCategoryDescr->DrawAddMode();
            } else {
                if ($mode == 'edit') {
                    $objCategoryDescr->DrawEditMode($rid);
                } else {
                    if ($mode == 'details') {
                        $objCategoryDescr->DrawDetailsMode($rid);
                    }
                }
            }
        }
        draw_content_end();
    } else {
        draw_title_bar(prepare_breadcrumbs(array(_LISTINGS_MANAGEMENT => '', _CATEGORY_DESCRIPTION => '')));
        draw_important_message(_WRONG_PARAMETER_PASSED);
    }
} else {
    draw_important_message(_NOT_AUTHORIZED);
}
Example #10
0
// *** Make sure the file isn't accessed directly
defined('APPHP_EXEC') or die('Restricted Access');
//--------------------------------------------------------------------------
$objNews = News::Instance();
$news = $objNews->GetNews(Application::Get('news_id'));
// Draw title bar
if ($objSession->IsMessage('notice')) {
    draw_title_bar(_NEWS);
    echo $objSession->GetMessage('notice');
} else {
    if ($news[1] == 1) {
        $news_type = isset($news[0]['type']) ? $news[0]['type'] : 'news';
        $header_text = isset($news[0]['header_text']) ? str_replace("\\'", "'", $news[0]['header_text']) : '';
        $body_text = isset($news[0]['body_text']) ? str_replace("\\'", "'", $news[0]['body_text']) : '';
        $date_created = isset($news[0]['mod_date_created']) ? $news[0]['mod_date_created'] : '';
        if ($news_type == 'events') {
            draw_title_bar(prepare_breadcrumbs(array(_EVENTS => '', $header_text => '')));
        } else {
            draw_title_bar(prepare_breadcrumbs(array(_NEWS => '', $header_text => '')));
        }
        echo '<div class="center_box_heading_news">' . $header_text . '</div>';
        echo '<div class="center_box_contents_news">' . $body_text . '</div>';
        echo '<div class="center_box_bottom_news"><i><b>' . _POSTED_ON . ':</b>&nbsp;' . $date_created . '</i></div>';
        if ($news_type == 'events') {
            $objNews->DrawRegistrationForm(Application::Get('news_id'), $header_text);
        }
    } else {
        draw_title_bar(_NEWS);
        draw_important_message(_WRONG_PARAMETER_PASSED);
    }
}
Example #11
0
    $additional_info = isset($_POST['additional_info']) ? prepare_input($_POST['additional_info']) : '';
    $order_number = isset($_POST['order_number']) ? prepare_input($_POST['order_number']) : '';
    if ($payment_method == 'paypal') {
        $title_desc = _PAYPAL_ORDER;
    } else {
        if ($payment_method == '2co') {
            $title_desc = _2CO_ORDER;
        } else {
            if ($payment_method == 'authorize') {
                $title_desc = _AUTHORIZE_NET_ORDER;
            } else {
                $title_desc = _ONLINE_ORDER;
            }
        }
    }
    draw_title_bar(prepare_breadcrumbs(array(_MY_ACCOUNT => '', _CHECKOUT => '', $title_desc => '')), prepare_permanent_link('index.php?customer=advertise', _BUTTON_BACK));
    // test mode alert
    if (ModulesSettings::Get('payments', 'mode') == 'TEST MODE') {
        draw_message(_TEST_MODE_ALERT_SHORT, true, true);
    }
    if ($task == "place_order") {
        if (AdvertisePlans::PlaceOrder($order_number, $cc_params)) {
            draw_success_message(_ORDER_PLACED_MSG);
        } else {
            draw_important_message(AdvertisePlans::$message);
        }
    } else {
        draw_important_message(_WRONG_PARAMETER_PASSED);
    }
} else {
    draw_important_message(_NOT_AUTHORIZED);
Example #12
0
		<tr>
			<td align="left" colspan="2">
				<input type="button" class="form_button" value="<?php 
        echo _BUTTON_CANCEL;
        ?>
" onclick="javascript:appGoTo('customer=my_account');" />
			</td>
			<td align="right">
				<input type="submit" class="form_button" name="btnSubmitPD" id="btnSubmitPD" value="<?php 
        echo _REMOVE;
        ?>
" />
			</td>
		</tr>
		<tr><td colspan="3">&nbsp;</td></tr>            
		</table>
		<?php 
    }
    ?>
	</form>

<?php 
} else {
    if ($objLogin->IsLoggedIn()) {
        draw_title_bar(prepare_breadcrumbs(array(_CUSTOMER => '', _REMOVE_ACCOUNT => '')));
        draw_important_message(_NOT_AUTHORIZED);
    } else {
        draw_title_bar(prepare_breadcrumbs(array(_CUSTOMER => '', _REMOVE_ACCOUNT => '')));
        draw_important_message(_MUST_BE_LOGGED);
    }
}
Example #13
0
    ?>
js/jquery-1.6.3.min.js"></script>
    <base href="<?php 
    echo $host;
    ?>
" />
    <style>
        body { text-align:left; }
</style>
</head>    
<body>
    <?php 
    $inquiry_category = isset($params['inquiry_category']) ? prepare_input($params['inquiry_category']) : '';
    $category_info = Categories::GetCategoryInfo($inquiry_category);
    $category_name = isset($category_info['name']) ? _SEND_INQUIRY_TO . ' ' . $category_info['name'] : _SEND_INQUIRY;
    $business_name = isset($params['business_name']) ? $params['business_name'] : '';
    $params['widget'] = true;
    $params['widget_host'] = $host_not_decoded;
    $params['widget_key'] = $key_not_decoded;
    if (!empty($msg)) {
        echo $msg;
    } else {
        draw_title_bar(_SEND_INQUIRY);
    }
    Inquiries::DrawInquiryForm($params);
    ?>
    
</body>
</html>
<?php 
}
Example #14
0
                         }
                     }
                 }
             }
         }
     }
 }
 // Start main content
 if ($mode == 'invoice') {
     $links = '<a href="javascript:void(\'invoice|preview\')" onclick="javascript:appPreview(\'invoice\');"><img src="images/printer.png" alt="" /> ' . _PRINT . '</a>';
 } else {
     if ($mode == 'description') {
         $links = '<a href="javascript:void(\'description|preview\')" onclick="javascript:appPreview(\'description\');"><img src="images/printer.png" alt="" /> ' . _PRINT . '</a>';
     }
 }
 draw_title_bar(prepare_breadcrumbs(array(_MY_ACCOUNT => "", _ORDERS_MANAGEMENT => "", ucfirst($action) => "")), $links);
 //if($user_session->IsMessage('notice')) echo $user_session->GetMessage('notice');
 echo $msg;
 draw_content_start();
 if ($mode == "view") {
     $objOrders->DrawViewMode();
 } else {
     if ($mode == "add") {
         $objOrders->DrawAddMode();
     } else {
         if ($mode == "edit") {
             $objOrders->DrawEditMode($rid);
         } else {
             if ($mode == "details") {
                 $objOrders->DrawDetailsMode($rid);
             } else {
Example #15
0
<?php

/**
* @project ApPHP Business Directory
* @copyright (c) 2012 ApPHP
* @author ApPHP <*****@*****.**>
* @license http://www.gnu.org/licenses/
*/
// draw title bar
draw_title_bar(_PAGES);
draw_content_start();
draw_important_message(_PAGE_NOT_EXISTS);
draw_content_end();
Example #16
0
                    }
                }
            }
        }
        draw_title_bar(prepare_breadcrumbs(array(_LISTINGS_MANAGEMENT => '', _LISTINGS => '', _CATEGORIES_MANAGEMENT => '', $category_info['third']['name'] => '', $category_info['second']['name'] => '', $category_info['first']['name'] => '', ucfirst($action) => '')), $cid != '0' ? prepare_permanent_link('index.php?admin=mod_categories&cid=' . $category_info_parent_id, _BUTTON_BACK) : '');
        echo $msg;
        draw_content_start();
        if ($mode == 'view') {
            $objCategories->DrawOperationLinks(prepare_permanent_link('index.php?admin=mod_categories&mg_action=recalculate', '[ ' . _RECALCULATE_LISTING_COUNT . ' ]'));
            $objCategories->DrawViewMode();
        } else {
            if ($mode == 'add') {
                $objCategories->DrawAddMode();
            } else {
                if ($mode == 'edit') {
                    $objCategories->DrawEditMode($rid);
                } else {
                    if ($mode == 'details') {
                        $objCategories->DrawDetailsMode($rid);
                    }
                }
            }
        }
        draw_content_end();
    } else {
        draw_title_bar(prepare_breadcrumbs(array(_LISTINGS_MANAGEMENT => '', _LISTINGS => '', _CATEGORIES_MANAGEMENT => '')));
        draw_important_message(_WRONG_PARAMETER_PASSED);
    }
} else {
    draw_important_message(_NOT_AUTHORIZED);
}
Example #17
0
			<tr><td colspan="2">&nbsp;</td></tr>
			
			<tr>
			<td colspan="3" align="<?php 
        echo Application::Get('defined_left');
        ?>
">
				<p><?php 
        echo _CREATE_ACCOUNT_NOTE;
        ?>
</p>
			</td>
			</tr>
			
			</table>
		</form>
	</div>	

	<script type="text/javascript">
		appSetFocus('<?php 
        echo $focus_field;
        ?>
');
	</script>
	
<?php 
    }
} else {
    draw_title_bar(prepare_breadcrumbs(array(_CUSTOMER => '', _CREATING_NEW_ACCOUNT => '')));
    draw_important_message(_NOT_AUTHORIZED);
}
Example #18
0
<?php

/**
* @project ApPHP Business Directory
* @copyright (c) 2011 ApPHP
* @author ApPHP <*****@*****.**>
* @license http://www.gnu.org/licenses/
*/
// *** Make sure the file isn't accessed directly
defined('APPHP_EXEC') or die('Restricted Access');
//--------------------------------------------------------------------------
draw_title_bar(prepare_breadcrumbs(array(_CATEGORIES => '')));
$objCategory = Categories::Instance();
$objCategory->DrawSubCategories();
Example #19
0
* @license http://www.gnu.org/licenses/
*/
// *** Make sure the file isn't accessed directly
defined('APPHP_EXEC') or die('Restricted Access');
//--------------------------------------------------------------------------
$task = isset($_POST['task']) ? prepare_input($_POST['task']) : '';
$keyword = isset($_POST['keyword']) ? strip_tags(prepare_input($_POST['keyword'])) : '';
if ($keyword == _SEARCH_KEYWORDS . '...') {
    $keyword = '';
}
$p = isset($_POST['p']) ? (int) $_POST['p'] : '';
$objSearch = new Search();
$search_result = '';
$title_bar = _LOOK_IN . ': 
		<select class="look_in" name="search_in" onchange="javascript:document.getElementById(\'search_in\').value=this.value;appQuickSearch();">
			<option value="listings" ' . (Application::Get('search_in') == 'listings' ? 'selected="selected"' : '') . '>' . _LISTINGS . '</option>
			<option value="pages" ' . (Application::Get('search_in') == 'pages' ? 'selected="selected"' : '') . '>' . _PAGES . '</option>
			<option value="news" ' . (Application::Get('search_in') == 'news' ? 'selected="selected"' : '') . '>' . _NEWS . '</option>
		</select>';
// Check if there is a page
if ($keyword != '') {
    draw_title_bar(_SEARCH_RESULT_FOR . ': ' . $keyword . '', $title_bar);
    if ($task == 'quick_search') {
        $search_result = $objSearch->SearchBy($keyword, $p, Application::Get('search_in'));
    }
    $objSearch->DrawPopularSearches();
    $objSearch->DrawSearchResult($search_result, $p, $keyword);
} else {
    draw_title_bar(_SEARCH_RESULT_FOR . ': ' . $keyword);
    draw_important_message(_NO_RECORDS_FOUND);
}
Example #20
0
<?php

/**
* @project ApPHP Business Directory
* @copyright (c) 2012 ApPHP
* @author ApPHP <*****@*****.**>
* @license http://www.gnu.org/licenses/
*/
// *** Make sure the file isn't accessed directly
defined('APPHP_EXEC') or die('Restricted Access');
//--------------------------------------------------------------------------
$email = isset($_REQUEST['email']) ? prepare_input($_REQUEST['email']) : '';
$task = isset($_REQUEST['task']) ? prepare_input($_REQUEST['task']) : '';
$focus_field = '';
draw_title_bar(_SUBSCRIBE_TO_NEWSLETTER);
if (Modules::IsModuleInstalled('news')) {
    $objNews = News::Instance();
    if ($task == 'subscribe') {
        if ($objNews->ProcessSubscription($email)) {
            draw_success_message(_NEWSLETTER_SUBSCRIBE_SUCCESS);
        } else {
            draw_important_message($objNews->error);
            $focus_field = 'subscribe_email';
        }
    } else {
        if ($task == 'unsubscribe') {
            if ($objNews->ProcessUnsubscription($email)) {
                draw_success_message(_NEWSLETTER_UNSUBSCRIBE_SUCCESS);
            } else {
                draw_important_message($objNews->error);
                $focus_field = 'unsubscribe_email';
Example #21
0
    /**
     *	Draws album
     *		@param $album_code
     *		@param $draw
     */
    public function DrawAlbum($album_code = '', $draw = true)
    {
        $lang = Application::Get('lang');
        $output = '';
        $icon_width = ModulesSettings::Get('gallery', 'album_icon_width');
        $icon_height = ModulesSettings::Get('gallery', 'album_icon_height');
        $albums_per_line = ModulesSettings::Get('gallery', 'albums_per_line');
        $wrapper = ModulesSettings::Get('gallery', 'wrapper');
        $image_gallery_type = ModulesSettings::Get('gallery', 'image_gallery_type');
        $image_gallery_rel = $image_gallery_type == 'lytebox' ? 'lyteshow' : 'rokbox';
        $video_gallery_type = ModulesSettings::Get('gallery', 'video_gallery_type');
        $video_gallery_rel = $video_gallery_type == 'videobox' ? 'vidbox' : 'rokbox';
        $show_items_count_in_album = ModulesSettings::Get('gallery', 'show_items_count_in_album');
        $album_code_parts = explode(':', $album_code);
        $album_code = isset($album_code_parts[0]) ? $album_code_parts[0] : '';
        $album_state = isset($album_code_parts[1]) ? $album_code_parts[1] : 'open';
        $sql = 'SELECT
					gad.name as album_name,
					gad.description,
					IF(gai.item_file_thumb != \'\', gai.item_file_thumb, gai.item_file) as mod_item_file_thumb,
					ga.album_code,
					ga.album_type,
					gai.item_file,
					gai.item_file_thumb,
					gaid.name as item_name,
					gaid.description as item_description,
					IF(gaid.description != \'\', gaid.description, gaid.name) as item_title
				FROM ' . TABLE_GALLERY_ALBUMS . ' ga
					INNER JOIN ' . TABLE_GALLERY_ALBUM_ITEMS . ' gai ON ga.album_code = gai.album_code
					LEFT OUTER JOIN ' . TABLE_GALLERY_ALBUMS_DESCRIPTION . ' gad ON ga.id = gad.gallery_album_id AND gad.language_id = \'' . $lang . '\'
					LEFT OUTER JOIN ' . TABLE_GALLERY_ALBUM_ITEMS_DESCRIPTION . ' gaid ON gai.id = gaid.gallery_album_item_id AND gaid.language_id = \'' . $lang . '\'
				WHERE
					ga.album_code = \'' . $album_code . '\' AND
					ga.is_active = 1 AND
					gai.item_file != \'\' AND
					gai.is_active = 1
				ORDER BY gai.priority_order ASC';
        $result_items = database_query($sql, DATA_AND_ROWS);
        if ($result_items[1] > 0) {
            if ($album_state == 'open') {
                $output .= draw_title_bar(_ALBUM . ': ' . $result_items[0][0]['album_name'], '', false);
            }
            $output .= '<table border="0" cellspacing="5"><tr>' . ($wrapper == 'div' ? '<td>' : '');
            for ($i = 0; $i < $result_items[1]; $i++) {
                $additional_params = preg_match('/youtube/i', $result_items[0][$i]['item_file']) ? '&amp;hd=1&amp;autoplay=1' : '';
                $title_image = $album_state == 'open' ? $result_items[0][$i]['item_title'] : _CLICK_TO_VIEW;
                if ($wrapper == 'table') {
                    if ($i != 0 && $i % $albums_per_line == 0) {
                        $output .= '</tr><tr>';
                    }
                    $output .= '<td valign="top" ' . ($album_state == 'closed' ? 'align="center"' : '') . '>';
                    if ($result_items[0][$i]['album_type'] == 'video') {
                        if ($album_state == 'open' || $album_state == 'closed' && $i == 0) {
                            $output .= ($album_state == 'open' ? $result_items[0][$i]['item_name'] : $result_items[0][0]['album_name']) . '<br>';
                            $output .= '<a href="' . $result_items[0][$i]['item_file'] . $additional_params . '" rel="' . $video_gallery_rel . '[720 480](album' . $result_items[0][$i]['album_code'] . ')" title="' . $result_items[0][$i]['item_title'] . '">';
                            $output .= '<img src="' . APPHP_BASE . ($result_items[0][$i]['item_file_thumb'] != '' ? $result_items[0][$i]['item_file_thumb'] : 'images/modules_icons/gallery/video.png') . '" alt="" title="' . _CLICK_TO_VIEW . '" border="0" />';
                            $output .= '</a>';
                        } else {
                            $output .= '<a href="' . APPHP_BASE . $result_items[0][$i]['item_file'] . $additional_params . '" rel="' . $video_gallery_rel . '[720 480](album' . $result_items[0][$i]['album_code'] . ')" title="' . $result_items[0][$i]['item_title'] . '"></a>';
                        }
                    } else {
                        if ($album_state == 'open' || $album_state == 'closed' && $i == 0) {
                            $output .= '<a href="' . APPHP_BASE . 'images/gallery/' . $result_items[0][$i]['item_file'] . '" rel="' . $image_gallery_rel . '[720 480](album' . $result_items[0][$i]['album_code'] . ')" title="' . $title_image . '"><img src="' . APPHP_BASE . 'images/gallery/' . $result_items[0][$i]['mod_item_file_thumb'] . '" width="' . $icon_width . '" ' . ($icon_height != 'px' ? 'height="' . $icon_height . '"' : '') . ' style="margin:5px 2px;" alt="" title="' . $title_image . '" border="" /></a>';
                            if ($album_state == 'open') {
                                $output .= '<div style="padding-left:3px;width:' . $icon_width . ';">' . ($i + 1) . '. ' . substr_by_word($result_items[0][$i]['item_name'], 40, true) . '</div>';
                            } else {
                                $output .= '<br>' . prepare_permanent_link('index.php?page=gallery&acode=' . $result_items[0][$i]['album_code'], '<b>' . $result_items[0][$i]['album_name'] . ' ' . ($show_items_count_in_album == 'yes' ? '(' . $result_items[1] . ')' : '') . '</b>', '', '', $result_items[0][$i]['description']);
                            }
                        } else {
                            $output .= '<a href="' . APPHP_BASE . 'images/gallery/' . $result_items[0][$i]['item_file'] . '" rel="' . $image_gallery_rel . '[720 480](album' . $result_items[0][$i]['album_code'] . ')" title="' . $title_image . '"></a>';
                        }
                    }
                    $output .= '</td>';
                } else {
                    if ($album_state == 'open' && $i != 0 && $i % $albums_per_line == 0) {
                        $output .= '<br>';
                    }
                    $output .= '<div style="float:' . Application::Get('defined_alignment') . ';margin-right:5px;width:' . $icon_width . ';">';
                    if ($result_items[0][$i]['album_type'] == 'video') {
                        if ($album_state == 'open' || $album_state == 'closed' && $i == 0) {
                            $output .= ($album_state == 'open' ? $result_items[0][$i]['item_name'] : prepare_permanent_link('index.php?page=gallery&acode=' . $result_items[0][$i]['album_code'], $result_items[0][0]['album_name'], '', '', $result_items[0][$i]['description'])) . '<br>';
                            $output .= '<a href="' . $result_items[0][$i]['item_file'] . $additional_params . '" rel="' . $video_gallery_rel . '[720 480](album' . $result_items[0][$i]['album_code'] . ')" title="' . _CLICK_TO_VIEW . '"><img src="' . APPHP_BASE . ($result_items[0][$i]['item_file_thumb'] != '' ? $result_items[0][$i]['item_file_thumb'] : 'images/modules_icons/gallery/video.png') . '" alt="" title="" border="0" /></a>';
                        } else {
                            $output .= '<a href="' . APPHP_BASE . $result_items[0][$i]['item_file'] . $additional_params . '" rel="' . $video_gallery_rel . '[720 480](album' . $result_items[0][$i]['album_code'] . ')" title="' . $result_items[0][$i]['item_title'] . '"></a>';
                        }
                    } else {
                        if ($album_state == 'open' || $album_state == 'closed' && $i == 0) {
                            $output .= '<a href="' . APPHP_BASE . 'images/gallery/' . $result_items[0][$i]['item_file'] . '" rel="' . $image_gallery_rel . '[720 480](album' . $result_items[0][$i]['album_code'] . ')" title="' . $title_image . '"><img src="' . APPHP_BASE . 'images/gallery/' . $result_items[0][$i]['mod_item_file_thumb'] . '" width="' . $icon_width . '" ' . ($icon_height != 'px' ? 'height="' . $icon_height . '"' : '') . ' style="margin-bottom:5px;" alt="" title="' . $title_image . '" border="0" /></a><br />';
                            if ($album_state == 'open') {
                                $output .= $i + 1 . '. ' . substr_by_word($result_items[0][$i]['item_name'], 40, true);
                            } else {
                                $output .= prepare_permanent_link('index.php?page=gallery&acode=' . $result_items[0][$i]['album_code'], '<b>' . $result_items[0][$i]['album_name'] . '</b> ' . ($show_items_count_in_album == 'yes' ? '(' . $result_items[1] . ')' : '')) . '</a>';
                            }
                        } else {
                            $output .= '<a href="' . APPHP_BASE . 'images/gallery/' . $result_items[0][$i]['item_file'] . '" rel="' . $image_gallery_rel . '[720 480](album' . $result_items[0][$i]['album_code'] . ')" title="' . $title_image . '"></a>';
                        }
                    }
                    $output .= '</div>';
                }
            }
            $output .= ($wrapper == 'div' ? '</td>' : '') . '</tr></table>';
        } else {
            $output .= draw_title_bar(_ALBUM . ': ' . $album_code . ' (' . _EMPTY . ')', '', false) . '<br />';
        }
        if ($draw) {
            echo $output;
        } else {
            return $output;
        }
    }
                            }
                        }
                    }
                }
            }
        }
    }
    // Start main content
    draw_title_bar(prepare_breadcrumbs(array(_MODULES => '', _COMMENTS => '', _COMMENTS_MANAGEMENT => '', $page_name ? $page_name : '' => '', ucfirst($action) => '')));
    echo $msg;
    draw_content_start();
    if ($mode == 'view') {
        $objComments->DrawViewMode();
    } else {
        if ($mode == 'add') {
            $objComments->DrawAddMode();
        } else {
            if ($mode == 'edit') {
                $objComments->DrawEditMode($rid);
            } else {
                if ($mode == 'details') {
                    $objComments->DrawDetailsMode($rid);
                }
            }
        }
    }
    draw_content_end();
} else {
    draw_title_bar(prepare_breadcrumbs(array(_MODULES => '', _COMMENTS_MANAGEMENT => '')));
    draw_important_message(_NOT_AUTHORIZED);
}
Example #23
0
if ($objLogin->IsLoggedInAsAdmin()) {
    $objPage = new Pages(Application::Get('page_id'), false, $mg_language_id);
} else {
    $objPage = new Pages(Application::Get('system_page') != '' ? Application::Get('system_page') : Application::Get('page_id'), true, $mg_language_id);
}
$button_text = '';
// check if there is a page
if ($objSession->IsMessage('notice')) {
    draw_title_bar(_PAGE);
    echo $objSession->GetMessage('notice');
} else {
    if ($objPage->CheckAccessRights($objLogin->IsLoggedIn())) {
        // check if there is a page
        if ($objPage->GetId() != '') {
            if ($objLogin->IsLoggedInAsAdmin() && Application::Get('preview') != 'yes') {
                $button_text = prepare_permanent_link('index.php?admin=pages' . (Application::Get('type') == 'system' ? '&type=system' : '') . '&mg_language_id=' . $mg_language_id, _BUTTON_BACK);
            }
            $objPage->DrawTitle($button_text);
            if (Modules::IsModuleInstalled('adsense') && (ModulesSettings::Get('adsense', 'adsense_code_activation') == 'All' || ModulesSettings::Get('adsense', 'adsense_code_activation') == 'Horizontal')) {
                //echo '<div class="adsense-horizontal">'.Adsense::GetHorizontalBanerCode().'</div>';
            }
            $objPage->DrawText();
        } else {
            draw_title_bar(_PAGES);
            draw_important_message(_PAGE_UNKNOWN);
        }
    } else {
        draw_title_bar(_PAGE);
        draw_important_message(_MUST_BE_LOGGED);
    }
}
Example #24
0
<?php

/**
* @project ApPHP Business Directory
* @copyright (c) 2011 ApPHP
* @author ApPHP <*****@*****.**>
* @license http://www.gnu.org/licenses/
*/
// *** Make sure the file isn't accessed directly
defined('APPHP_EXEC') or die('Restricted Access');
//--------------------------------------------------------------------------
// Draw title bar
draw_title_bar(prepare_breadcrumbs(array(_ACCOUNTS => '', _CUSTOMER_LOGIN => '')));
// Check if customer is logged in
if (!$objLogin->IsLoggedIn() && ModulesSettings::Get('customers', 'allow_login') == 'yes') {
    if ($objLogin->IsWrongLogin()) {
        draw_important_message($objLogin->GetLoginError()) . '<br />';
    } else {
        if ($objLogin->IsIpAddressBlocked()) {
            draw_important_message(_IP_ADDRESS_BLOCKED) . '<br />';
        } else {
            if ($objLogin->IsEmailBlocked()) {
                draw_important_message(_EMAIL_BLOCKED) . '<br />';
            } else {
                if ($objSession->IsMessage('notice')) {
                    draw_message($objSession->GetMessage('notice'));
                }
            }
        }
    }
    $remember_me = isset($_POST['remember_me']) ? (int) $_POST['remember_me'] : '';
Example #25
0
    //if($objSession->IsMessage('notice')) echo $objSession->GetMessage('notice');
    if (!empty($msg)) {
        echo $msg;
    } else {
        if (Modules::IsModuleInstalled('payments') && ModulesSettings::Get('payments', 'is_active') == 'yes') {
            draw_message(str_replace('_LISTINGS_COUNT_', $objLogin->GetAvailableListings(), _AVAILABLE_LISTINGS_ALERT));
        }
    }
    //draw_content_start();
    echo '<div class="pages_contents">';
    if ($mode == 'view') {
        $objListings->DrawViewMode();
    } else {
        if ($mode == 'add') {
            $objListings->DrawAddMode();
        } else {
            if ($mode == 'edit') {
                $objListings->DrawEditMode($rid);
            } else {
                if ($mode == 'details') {
                    $objListings->DrawDetailsMode($rid);
                }
            }
        }
    }
    //draw_content_end();
    echo '</div>';
} else {
    draw_title_bar(_CUSTOMER);
    draw_important_message(_NOT_AUTHORIZED);
}
Example #26
0
    } else {
        if (!$password_sent) {
            $objAdmin = new Admins($objSession->GetSessionVariable('session_account_id'));
            if ($objAdmin->SendPassword($email)) {
                $msg = draw_success_message(_PASSWORD_SUCCESSFULLY_SENT, false);
                Session::Set('password_sent', true);
            } else {
                $msg = draw_important_message($objAdmin->error, false);
            }
        } else {
            $msg = draw_message(_PASSWORD_ALREADY_SENT, false);
        }
    }
}
// Draw title bar
draw_title_bar(prepare_breadcrumbs(array(_ADMIN => '', _PASSWORD_FORGOTTEN => '')));
// Check if user is logged in
if (!$objLogin->IsLoggedIn()) {
    echo $msg;
    ?>
	<div class="pages_contents">
	<form action="index.php?admin=password_forgotten" method="post">
		<?php 
    draw_hidden_field('act', 'send');
    ?>
		<?php 
    draw_token_field();
    ?>
		
		<table class="loginForm" width="99%" border="0">
		<tr>
                    }
                }
            }
        }
    }
    // Start main content
    draw_title_bar(prepare_breadcrumbs(array(_MODULES => '', _GALLERY => '', _GALLERY_SETTINGS => '', ucfirst($action) => '')));
    echo '<br />';
    //if($objSession->IsMessage('notice')) echo $objSession->GetMessage('notice');
    echo $msg;
    draw_content_start();
    if ($mode == 'view') {
        $objGallery->DrawViewMode();
    } else {
        if ($mode == 'add') {
            $objGallery->DrawAddMode();
        } else {
            if ($mode == 'edit') {
                $objGallery->DrawEditMode($rid);
            } else {
                if ($mode == 'details') {
                    $objGallery->DrawDetailsMode($rid);
                }
            }
        }
    }
    draw_content_end();
} else {
    draw_title_bar(_ADMIN);
    draw_important_message(_NOT_AUTHORIZED);
}
Example #28
0
<?php

/**
* @project ApPHP Business Directory
* @copyright (c) 2011 ApPHP
* @author ApPHP <*****@*****.**>
* @license http://www.gnu.org/licenses/
*/
// *** Make sure the file isn't accessed directly
defined('APPHP_EXEC') or die('Restricted Access');
//--------------------------------------------------------------------------
$task = isset($_POST['task']) ? prepare_input($_POST['task']) : '';
$keyword = isset($_POST['keyword']) ? strip_tags(prepare_input($_POST['keyword'])) : '';
if ($keyword == _SEARCH_KEYWORDS . '...') {
    $keyword = '';
}
$p = isset($_POST['p']) ? (int) $_POST['p'] : '';
$objSearch = new Search();
$search_result = '';
draw_title_bar(_ADVANCED_SEARCH);
Search::DrawAdvancedSearch();
// Check if there is a page
if ($task == 'advanced_search') {
    $search_result = $objSearch->SearchBy($keyword, $p, 'listings');
    if (!empty($search_result)) {
        $objSearch->DrawSearchResult($search_result, $p, $keyword, 'advanced');
    } else {
        draw_important_message(_NO_RECORDS_FOUND);
    }
}