/** * Returns horizontal banner code */ public static function GetHorizontalBanerCode() { if (Modules::IsModuleInstalled('adsense')) { $activation = strtolower(ModulesSettings::Get('adsense', 'adsense_code_activation')); if ($activation == 'horizontal' || $activation == 'all') { return ModulesSettings::Get('adsense', 'adsense_code_horizontal'); } } return ''; }
<div class="center_box_wrapper <?php echo Application::Get('defined_alignment'); ?> "> <!-- MAIN CONTENT --> <?php if (Application::Get('page') != '' && Application::Get('page') != 'home') { if (file_exists('page/' . Application::Get('page') . '.php')) { include_once 'page/' . Application::Get('page') . '.php'; } else { include_once 'page/404.php'; } } else { if (Application::Get('customer') != '') { if (Modules::IsModuleInstalled('customers') && file_exists('customer/' . Application::Get('customer') . '.php')) { include_once 'customer/' . Application::Get('customer') . '.php'; } else { include_once 'customer/404.php'; } } else { if (Application::Get('admin') != '' && file_exists('admin/' . Application::Get('admin') . '.php')) { include_once 'admin/' . Application::Get('admin') . '.php'; } else { if (Application::Get('template') == 'admin') { include_once 'admin/home.php'; } else { include_once 'page/pages.php'; } } }
<?php //////////////////////////////////////////////////////////////////////////////// // PayPal Order Notify // Last modified: 23.02.2012 //////////////////////////////////////////////////////////////////////////////// // *** Make sure the file isn't accessed directly defined('APPHP_EXEC') or die('Restricted Access'); //-------------------------------------------------------------------------- if (Modules::IsModuleInstalled('payments')) { $mode = ModulesSettings::Get('payments', 'mode'); if (ModulesSettings::Get('payments', 'is_active') == 'yes') { //---------------------------------------------------------------------- define('LOG_MODE', false); define('LOG_TO_FILE', false); define('LOG_ON_SCREEN', false); define('TEST_MODE', $mode == 'TEST MODE' ? true : false); $log_data = ''; $msg = ''; $nl = "\n"; // --- Get PayPal response $objPaymentIPN = new PaymentIPN($_REQUEST, 'paypal'); $status = $objPaymentIPN->GetPaymentStatus(); $order_number = $objPaymentIPN->GetParameter('custom'); $transaction_number = $objPaymentIPN->GetParameter('txn_id'); $payer_status = $objPaymentIPN->GetParameter('payer_status'); $pp_payment_type = $objPaymentIPN->GetParameter('payment_type'); $total = $objPaymentIPN->GetParameter('mc_gross'); // Payment Types : 0 - Online Order, 1 - PayPal, 2 - 2CO, 3 - Authorize.Net // Payment Methods : 0 - Payment Company Account, 1 - Credit Card, 2 - E-Check if ($status == 'Completed') {
<?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'); //-------------------------------------------------------------------------- if ($objLogin->IsLoggedInAsAdmin() && Modules::IsModuleInstalled('gallery')) { $action = MicroGrid::GetParameter('action'); $rid = MicroGrid::GetParameter('rid'); $album = MicroGrid::GetParameter('album', false); $mode = 'view'; $msg = ''; $objAlbums = new GalleryAlbums(); $album_info = $objAlbums->GetAlbumInfo($album); if (count($album_info) > 0) { $objAlbumItems = new GalleryAlbumItems(); if ($action == 'add') { $mode = 'add'; } else { if ($action == 'create') { if ($objAlbumItems->AddRecord()) { $msg = draw_success_message(_ADDING_OPERATION_COMPLETED, false); $mode = 'view'; } else { $msg = draw_important_message($objAlbumItems->error, false); $mode = 'add';
/** * Draws mass mail form * $param $draw */ public function DrawMassMailForm($draw = true) { global $objSettings; $template_subject = ''; $template_content = ''; $result = database_query('SELECT COUNT(*) as cnt FROM ' . $this->TABLE_NAME . ' WHERE is_active = 1 AND email_notifications = 1 AND email != \'\'', DATA_ONLY, FIRST_ROW_ONLY); $members_emails_count = isset($result['cnt']) ? $result['cnt'] : 0; $result = database_query('SELECT COUNT(*) as cnt FROM ' . TABLE_ACCOUNTS . ' WHERE is_active = 1 AND email != \'\'', DATA_ONLY, FIRST_ROW_ONLY); $admins_emails_count = isset($result['cnt']) ? $result['cnt'] : 0; $emails_count = $members_emails_count + $admins_emails_count; $result = database_query('SELECT COUNT(*) as cnt FROM ' . TABLE_NEWS_SUBSCRIBED . ' WHERE email != \'\'', DATA_ONLY, FIRST_ROW_ONLY); $newsletter_subscribers_count = isset($result['cnt']) ? $result['cnt'] : 0; $send_copy_to_admin = '1'; $email_from = $objSettings->GetParameter('admin_email'); $template_code = isset($_GET['template_code']) ? prepare_input($_GET['template_code']) : ''; $duration = isset($_POST['duration']) ? (int) $_POST['duration'] : '5'; $members_module_installed = Modules::IsModuleInstalled($this->MODULE_NAME); // load appropriate email template if ($template_code != '') { $template = $this->GetTemplate($template_code, Application::Get('lang')); $template_subject = $template['template_subject']; $template_content = $template['template_content']; } if ($this->error == true) { $template_code = isset($_POST['template_name']) ? prepare_input($_POST['template_name']) : ''; $template_subject = isset($_POST['subject']) ? prepare_input($_POST['subject']) : ''; $template_content = isset($_POST['message']) ? prepare_input($_POST['message']) : ''; } $output = '<script type="text/javascript"> function duration_OnChange(val){ var el_package_size = (document.getElementById(\'package_size\')) ? document.getElementById(\'package_size\') : null; if(val == \'\' && el_package_size){ el_package_size.selectedIndex = 0; el_package_size.disabled = \'disabled\'; }else{ el_package_size.disabled = \'\'; } } function email_to_OnChange(val){ var el_send_copy_to_admin = (document.getElementById(\'send_copy_to_admin\')) ? document.getElementById(\'send_copy_to_admin\') : null; if(val == \'admins\' && el_send_copy_to_admin){ el_send_copy_to_admin.disabled = \'disabled\'; }else{ el_send_copy_to_admin.disabled = \'\'; } } function OnSubmit_Check(){ var email_to = (document.getElementById(\'email_to\')) ? document.getElementById(\'email_to\').value : \'\'; var email_from = (document.getElementById(\'email_from\')) ? document.getElementById(\'email_from\').value : \'\'; var subject = (document.getElementById(\'subject\')) ? document.getElementById(\'subject\').value : \'\'; var message = (document.getElementById(\'message\')) ? document.getElementById(\'message\').value : \'\'; if(email_to == \'\'){ alert(\'' . str_replace('_FIELD_', _EMAIL_TO, _FIELD_CANNOT_BE_EMPTY) . '\'); document.getElementById(\'email_to\').focus(); return false; }else if(email_from == \'\'){ alert(\'' . str_replace('_FIELD_', _EMAIL_FROM, _FIELD_CANNOT_BE_EMPTY) . '\'); document.getElementById(\'email_from\').focus(); return false; }else if(email_from != \'\' && !appIsEmail(email_from)){ alert(\'' . str_replace('_FIELD_', _EMAIL_FROM, _FIELD_MUST_BE_EMAIL) . '\'); document.getElementById(\'email_from\').focus(); return false; }else if(subject == \'\'){ alert(\'' . str_replace('_FIELD_', _SUBJECT, _FIELD_CANNOT_BE_EMPTY) . '\'); document.getElementById(\'subject\').focus(); return false; }else if(message == \'\'){ alert(\'' . str_replace('_FIELD_', _MESSAGE, _FIELD_CANNOT_BE_EMPTY) . '\'); document.getElementById(\'message\').focus(); return false; }else if(email_to == \'all\'){ if(!confirm(\'' . _PERFORM_OPERATION_COMMON_ALERT . '\')){ return false; } } return true; } </script>'; $output .= '<form action="index.php?admin=mass_mail" method="post" style="margin:0px;"> ' . draw_hidden_field('task', 'send', false) . ' ' . draw_hidden_field('email_random_code', get_random_string(10), false) . ' ' . draw_token_field(false) . ' <table border="0" cellspacing="10"> <tr> <td align="left" valign="top"> <fieldset style="height:410px;"> <legend><b>' . _FORM . ':</b></legend> <table width="97%" align="center" border="0" cellspacing="5"> <tr> <td align="right" nowrap="nowrap"> <label>' . _EMAIL_TEMPLATES . ':</label><br> ' . prepare_permanent_link('index.php?admin=email_templates', '[ ' . _MANAGE_TEMPLATES . ' ]', '', '') . ' </td> <td></td> <td> <table cellpadding="0" cellspacing="0"> <tr valign="middle"> <td> <select name="template_name" id="template_name" style="margin-bottom:3px;" onchange="javascript:appGoTo(\'admin=mass_mail&template_code=\'+this.value)"> <option value="">-- ' . _NO_TEMPLATE . ' --</option>'; $templates = $this->GetAllTemplates('is_system_template=0'); for ($i = 0; $i < $templates[1]; $i++) { $output .= '<option'; $output .= $templates[0][$i]['is_system_template'] == '1' ? ' style="background-color:#ffffcc;color:#000055"' : ''; $output .= $template_code == $templates[0][$i]['template_code'] ? ' selected="selected"' : ''; $output .= ' value="' . encode_text($templates[0][$i]['template_code']) . '">' . $templates[0][$i]['template_name'] . '</option>'; } $output .= ' </select> </td> </tr> </table> </td> </tr> <tr> <td align="right" nowrap="nowrap"><label>' . _EMAIL_TO . ':</label></td> <td><span class="mandatory_star">*</span></td> <td> <select name="email_to" id="email_to" style="margin-bottom:3px;" onchange="email_to_OnChange(this.value)"> <option value="">-- ' . _SELECT . ' --</option> <option value="test" style="background-color:#ffffcc;color:#000055">' . _TEST_EMAIL . ' (' . $email_from . ')</option>'; if (Modules::IsModuleInstalled('news')) { $output .= '<option value="newsletter_subscribers" style="background-color:#ffccff;color:#000055">' . _NEWSLETTER_SUBSCRIBERS . ' (' . $newsletter_subscribers_count . ')</option>'; } if ($members_module_installed) { $output .= '<optgroup label="' . $this->MEMBERS_NAME . '">'; $output .= '<option value="members|all">' . _ALL . ' (' . $members_emails_count . ')</option>'; if (self::$PROJECT == 'ShoppingCart' || self::$PROJECT == 'BusinessDirectory' || self::$PROJECT == 'HotelSite') { $arrMembersGroups = CustomerGroups::GetAllGroupsByCustomers(); } else { if (self::$PROJECT == 'MedicalAppointment') { $arrMembersGroups = PatientGroups::GetAllGroupsByPatiens(); } else { $arrMembersGroups = UserGroups::GetAllGroupsByUsers(); } } $member_groups_emails_count = 0; if ($arrMembersGroups[1] > 0) { foreach ($arrMembersGroups[0] as $key => $val) { if ($val[$this->MODULE_NAME . '_count']) { $output .= '<option value="members|' . $val['id'] . '">' . $val['name'] . ' (' . $val[$this->MODULE_NAME . '_count'] . ')</option>'; $member_groups_emails_count += $val[$this->MODULE_NAME . '_count']; } } } $member_non_groups_emails = $members_emails_count - $member_groups_emails_count; $output .= '<option value="members|uncategorized">' . _UNCATEGORIZED . ' (' . $member_non_groups_emails . ')</option>'; $output .= '</optgroup>'; } $output .= '<option value="admins">' . _ADMINS . ' (' . $admins_emails_count . ')</option>'; if ($members_module_installed) { $output .= '<option value="all">' . $this->ADMINS_MEMBERS_NAME . ' (' . $emails_count . ')</option>'; } $output .= '</select> </td> </tr> <tr> <td align="right" nowrap="nowrap"><label for="email">' . _EMAIL_FROM . ':</label></td> <td><span class="mandatory_star">*</span></td> <td> <input type="text" name="email_from" style="width:210px" id="email_from" value="' . decode_text($email_from) . '" maxlength="70" /> </td> </tr> <tr valign="top"> <td align="right" nowrap="nowrap"><label>' . _SUBJECT . ':</label></td> <td><span class="mandatory_star">*</span></td> <td> <input type="text" style="width:410px" name="subject" id="subject" value="' . decode_text($template_subject) . '" maxlength="255" /> </td> </tr> <tr valign="top"> <td align="right" nowrap="nowrap"><label>' . _MESSAGE . ':</label></td> <td><span class="mandatory_star">*</span></td> <td> <textarea style="width:465px;margin-right:10px;" rows="10" name="message" id="message">' . $template_content . '</textarea> </td> </tr>'; $output .= '<tr valign="middle"> <td colspan="2"></td> <td><img src="images/question_mark.png" alt="">' . _MASS_MAIL_ALERT . '</td> </tr>'; $output .= '<tr><td colspan="3" nowrap style="height:6px;"></td></tr> <tr> <td align="right" nowrap="nowrap"><a href="javascript:void(0);" onclick="appPopupWindow(\'mail_preview.html\',\'message\')">[ ' . _PREVIEW . ' ]</a></td> <td></td> <td> <div style="float:left"><input type="checkbox" class="form_checkbox" name="send_copy_to_admin" id="send_copy_to_admin" ' . ($send_copy_to_admin == '1' ? 'checked="checked"' : '') . ' value="1"> <label for="send_copy_to_admin">' . _SEND_COPY_TO_ADMIN . '</label></div> <div style="float:right"><input class="form_button" type="submit" name="btnSubmit" value="' . _SEND . '" onclick="return OnSubmit_Check();"> </div> </td> </tr> </table> </fieldset> </td> <td align="left" valign="top"> <fieldset style="padding-' . Application::Get('defined_right') . ':10px;"> <legend>' . _PREDEFINED_CONSTANTS . ':</legend> <ul> <li>{FIRST NAME} <br><span style="color:a0a0a0">' . _PC_FIRST_NAME_TEXT . '</span></li> <li>{LAST NAME} <br><span style="color:a0a0a0">' . _PC_LAST_NAME_TEXT . '</span></li> <li>{USER NAME} <br><span style="color:a0a0a0">' . _PC_USER_NAME_TEXT . '</span></li> <li>{USER EMAIL} <br><span style="color:a0a0a0">' . _PC_USER_EMAIL_TEXT . '</span></li> <li>{BASE URL} <br><span style="color:a0a0a0">' . _PC_WEB_SITE_BASED_URL_TEXT . '</span></li> <li>{WEB SITE} <br><span style="color:a0a0a0">' . _PC_WEB_SITE_URL_TEXT . '</span></li> <li>{YEAR} <br><span style="color:a0a0a0">' . _PC_YEAR_TEXT . '</span></li> </ul> </fieldset> </td> </tr> </table> </form>'; if ($draw) { echo $output; } else { return $output; } }
<?php /** * @project ApPHP Medical Appointment * @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'); //-------------------------------------------------------------------------- if ($objLogin->IsLoggedInAsCustomer() && Modules::IsModuleInstalled('listings')) { $action = MicroGrid::GetParameter('action'); $rid = MicroGrid::GetParameter('rid'); $listing_id = MicroGrid::GetParameter('listing_id', false); $mode = 'view'; $msg = ''; if (!empty($listing_id)) { $objListingsCategories = new ListingsCategories($listing_id, 'me'); if ($action == 'add') { $mode = 'add'; } else { if ($action == 'create') { if ($objListingsCategories->AddRecord()) { $msg = draw_success_message(_ADDING_OPERATION_COMPLETED, false); $mode = 'view'; } else { $msg = draw_important_message($objListingsCategories->error, false); $mode = 'add'; } } else {
/** * Draw top banners code * @param $banner_image * @param $show_always * @param $draw */ public static function DrawBannersTop(&$banner_image, $show_always = true, $draw = true) { global $objLogin; $default_banner_image = ''; $nl = "\n"; if (Modules::IsModuleInstalled('banners')) { $is_banners_active = ModulesSettings::Get('banners', 'is_active'); $rotate_delay = ModulesSettings::Get('banners', 'rotate_delay'); $rotation_type = ModulesSettings::Get('banners', 'rotation_type'); $caption_html = ModulesSettings::Get('banners', 'slideshow_caption_html'); if ($is_banners_active == 'yes') { $objBanners = new Banners(); if ($rotation_type == 'slide show') { $arrBanners = $objBanners->GetBannersArray(); if ($show_always || !$show_always && Application::Get('page') == 'home' && !$objLogin->IsLoggedIn()) { $output = '<script src="' . APPHP_BASE . 'modules/cslide/jquery.cross-slide.min.js" type="text/javascript"></script>' . $nl; $output .= '<script type="text/javascript">' . $nl; $output .= 'jQuery(function() { jQuery(\'#slideshow\').crossSlide({ sleep: ' . $rotate_delay . ', fade: 2,variant: true }, [ '; $ind = '0'; foreach ($arrBanners as $key => $val) { if ($ind == '0') { $default_banner_image = 'images/banners/' . $val['image_file']; } else { $output .= ','; } $output .= '{ src: \'images/banners/' . $val['image_file'] . '\', alt: \'' . encode_text($val['image_text']) . ($val['link_url'] != '' ? '##' . $val['link_url'] : '') . '\', to:\'up\' }'; $ind++; } $output .= '], function(idx, img, idxOut, imgOut) { var img_alt_split = img.alt.split(\'##\'); var caption_width = jQuery(\'div#slideshow\').width() - 20; if(idxOut == undefined){ /* starting single image phase, put up caption */ if(img.alt != \'\'){ jQuery(\'div.slideshow-caption\').click(function(){ if(img_alt_split[1] != undefined && img_alt_split[1] != \'\') appGoToPage(img_alt_split[1]); }); jQuery(\'div.slideshow-caption\').' . ($caption_html == 'yes' ? 'html' : 'text') . '(img_alt_split[0]).animate({ opacity: .7 }) jQuery(\'div.slideshow-caption\').fadeIn(); if(caption_width != null) jQuery(\'div.slideshow-caption\').width(caption_width); } }else{ // starting cross-fade phase, take out caption jQuery(\'div.slideshow-caption\').click(function() { }); jQuery(\'div.slideshow-caption\').fadeOut(); }}) });'; $output .= '</script>' . $nl; if ($ind == 1) { $banner_image = '<div class="banners-box-random" id="slideshow">' . $objBanners->GetRandomBanner() . '</div>'; } else { if ($draw) { echo $output; } else { return $output; } $banner_image = '<div class="banners-box-slideshow" id="slideshow"></div><div class="slideshow-caption"></div>'; } } } else { if ($show_always || !$show_always && Application::Get('page') == 'home' && !$objLogin->IsLoggedIn()) { $banner_image = '<div class="banners-box-random" id="slideshow">' . $objBanners->GetRandomBanner() . '</div>'; } } } } }
<?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'); //-------------------------------------------------------------------------- if (Modules::IsModuleInstalled('gallery')) { $objGalleryAlbum = new GalleryAlbums(); $objGalleryAlbum->DrawAlbum(Application::Get('album_code')); } else { draw_important_message(_PAGE_UNKNOWN); } ?>
<?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'); //-------------------------------------------------------------------------- if ($objLogin->IsLoggedInAsCustomer() && Modules::IsModuleInstalled('inquiries')) { $action = MicroGrid::GetParameter('action'); $rid = MicroGrid::GetParameter('rid'); $act = MicroGrid::GetParameter('act', false); $mode = 'view'; $msg = ''; $inq_id = isset($_GET['inq_id']) ? (int) $_GET['inq_id'] : '0'; $customer_id = $objLogin->GetLoggedID(); $objInquiries = Inquiries::Instance(); if ($objInquiries->CustomerRelatedToInquire($inq_id)) { $objInquiriesReplies = new InquiriesReplies($inq_id, $customer_id); if ($act == 'add') { $customer_replies = !empty($customer_id) ? InquiriesReplies::GetInquiryRepliesForCustomer($inq_id, $customer_id) : 0; $inquiry_info = $objInquiries->GetInfoByID($inq_id); $is_active = isset($inquiry_info['is_active']) ? $inquiry_info['is_active'] : 0; $add_mode = $is_active && !empty($customer_id) && !$customer_replies ? true : false; if ($add_mode) { $action = 'add'; $objInquiriesReplies->SetActions(array('add' => $add_mode)); }
<?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'); //-------------------------------------------------------------------------- if ($objLogin->IsLoggedInAsAdmin() && Modules::IsModuleInstalled('inquiries')) { $action = MicroGrid::GetParameter('action'); $rid = MicroGrid::GetParameter('rid'); $mode = 'view'; $msg = ''; $inq_id = isset($_GET['inq_id']) ? (int) $_GET['inq_id'] : '0'; $objInquiries = Inquiries::Instance(); $inquiry_info = $objInquiries->GetInfoByID($inq_id); if (count($inquiry_info) > 0) { $objInquiriesReplies = new InquiriesReplies($inq_id); if ($action == 'add') { $mode = 'view'; } else { if ($action == 'create') { $mode = 'view'; } else { if ($action == 'edit') { $mode = 'edit'; } else { if ($action == 'update') {
<?php Inquiries::DrawTopGuideBlock(); ?> <div class="center_box_wrapper <?php echo Application::Get('defined_alignment'); ?> "> <!-- MAIN CONTENT --> <?php if (Application::Get('page') != '' && file_exists('page/' . Application::Get('page') . '.php')) { include_once 'page/' . Application::Get('page') . '.php'; } else { if (Application::Get('customer') != '' && file_exists('customer/' . Application::Get('customer') . '.php')) { if (Modules::IsModuleInstalled('customers')) { include_once 'customer/' . Application::Get('customer') . '.php'; } else { include_once 'customer/404.php'; } } else { if (Application::Get('admin') != '' && file_exists('admin/' . Application::Get('admin') . '.php')) { include_once 'admin/' . Application::Get('admin') . '.php'; } else { if (Application::Get('template') == 'admin') { include_once 'admin/home.php'; } else { include_once 'page/pages.php'; } } }
<?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';
<?php // *** Make sure the file isn't accessed directly defined('APPHP_EXEC') or die('Restricted Access'); //-------------------------------------------------------------------------- include_once 'include/functions.admin.inc.php'; if (@$objLogin->IsLoggedInAsAdmin() && Modules::IsModuleInstalled('payments')) { define('TABS_DIR', 'modules/tabs/'); require_once TABS_DIR . 'tabs.class.php'; echo '<script type="text/javascript" src="http://www.google.com/jsapi"></script>'; $first_tab_content = ''; $second_tab_content = ''; $third_tab_content = ''; $tabid = isset($_POST['tabid']) ? prepare_input($_POST['tabid']) : '1_1'; $nl = "\n"; $chart_type = isset($_POST['chart_type']) ? prepare_input($_POST['chart_type']) : 'columnchart'; $year = isset($_POST['year']) ? prepare_input($_POST['year']) : date('Y'); if ($tabid == '1_1') { $first_tab_content = ' <script type="text/javascript"> function drawVisualization(){ // Create and populate the data table. var data = new google.visualization.DataTable(); data.addColumn(\'string\', \'' . _MONTH . '\'); data.addColumn(\'number\', \'' . _ORDERS . '\');'; $selStatType = 'COUNT(*)'; $join_clause = ''; $where_clause = ' AND status > 1'; $sql = 'SELECT (SELECT ' . $selStatType . ' FROM ' . TABLE_ORDERS . ' o ' . $join_clause . ' WHERE SUBSTRING(o.payment_date, 6, 2) = \'01\' AND SUBSTRING(o.payment_date, 1, 4) = \'' . $year . '\' ' . $where_clause . ') as month1, (SELECT ' . $selStatType . ' FROM ' . TABLE_ORDERS . ' o ' . $join_clause . ' WHERE SUBSTRING(o.payment_date, 6, 2) = \'02\' AND SUBSTRING(o.payment_date, 1, 4) = \'' . $year . '\' ' . $where_clause . ') as month2,
/** * Draw page text */ public function DrawText() { global $objLogin; $objGallery = new GalleryAlbums(); $objContactUs = ContactUs::Instance(); $replace_needles = 1; $module_page = false; if (!count($this->page)) { return false; } // dont show this page if it was expired if (!$objLogin->IsLoggedInAsAdmin() && $this->page['finish_publishing'] != '0000-00-00' && date('Y-m-d') > $this->page['finish_publishing']) { draw_important_message(_PAGE_EXPIRED); return false; } if ($this->page['content_type'] == 'article' && isset($this->page['page_text'])) { $page_text = decode_text($this->page['page_text'], false); echo '<div class="pages_contents">'; if (preg_match('/{module:gallery}/i', $page_text)) { $module_page = true; $page_text = @preg_replace('/{module:gallery}/i', $objGallery->DrawGallery(false), $page_text, 1); } if (preg_match_all('/{module:album=(.*?)}/i', $page_text, $matches)) { $module_page = true; if (is_array($matches[1])) { foreach ($matches[1] as $key => $val) { if (strtolower($val) != 'code') { $val = @preg_replace('/[^A-Za-z0-9:]/i', '', $val); $page_text = @preg_replace('/{module:album=' . $val . '}/i', $objGallery->DrawAlbum($val, false), $page_text, 1); } } } } if (self::$PROJECT == 'MedicalAppointment') { if (preg_match('/{module:about_us}/i', $page_text)) { $module_page = true; $page_text = @preg_replace('/{module:about_us}/i', Clinic::DrawAboutUs(false), $page_text, 1); } } if (self::$PROJECT == 'HotelSite') { if (preg_match('/{module:about_us}/i', $page_text)) { $module_page = true; $page_text = @preg_replace('/{module:about_us}/i', Hotels::DrawAboutUs(false), $page_text, 1); } if (preg_match('/{module:rooms}/i', $page_text)) { $module_page = true; $page_text = @preg_replace('/{module:rooms}/i', Rooms::DrawRoomsInfo(false), $page_text, 1); } if (preg_match('/{module:testimonials}/i', $page_text)) { $module_page = true; $page_text = @preg_replace('/{module:testimonials}/i', Testimonials::DrawTestimonails(false), $page_text, 1); } } if (preg_match('/{module:contact_us}/i', $page_text)) { $module_page = true; $page_text = @preg_replace('/{module:contact_us}/i', $objContactUs->DrawContactUsForm(false), $page_text, 1); } if (preg_match('/{module:faq}/i', $page_text)) { $module_page = true; $page_text = @preg_replace('/{module:faq}/i', FaqCategories::DrawFaqList(false), $page_text, 1); } if (function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc()) { $page_text = stripslashes($page_text); } if ($this->page['is_home']) { if (self::$PROJECT == 'HotelSite') { Campaigns::DrawCampaignBanner('standard'); Campaigns::DrawCampaignBanner('global'); } } //echo $page_text; //echo "<hr>"; // draw all needed blocks for Home page if ($this->page['is_home']) { if (self::$PROJECT == 'BusinessDirectory') { if (ModulesSettings::Get('listings', 'show_categories_home_block') == 'yes') { Categories::DrawHomePageBlock(); } } else { if (self::$PROJECT == 'ShoppingCart') { if (ModulesSettings::Get('products_catalog', 'is_active') == 'yes') { Campaigns::DrawCampaignBanner(); if (ModulesSettings::Get('products_catalog', 'show_featured_block') == 'home page') { Products::DrawFeaturedBlock('home'); } if (ModulesSettings::Get('products_catalog', 'show_new_products_block') == 'home page') { Products::DrawNewProductsBlock(); } Categories::DrawHomePageBlock(); } } } } // draw comments form if (!$this->page['is_home'] && !$module_page) { if (Modules::IsModuleInstalled('comments')) { if (ModulesSettings::Get('comments', 'comments_allow') == 'yes' && $this->page['comments_allowed']) { $objComments = new Comments(); $objComments->DrawArticleComments($this->page['id']); } } } echo '</div>'; } else { if ($this->page['content_type'] == 'link' && isset($this->page['link_url'])) { $link_url = decode_text($this->page['link_url']); echo '<div class="pages_contents">'; echo '<a href="' . $link_url . '">' . $link_url . '</a>'; echo '</div>'; } } }
/** * Draws top guide block (3 steps) * @param $draw */ public static function DrawTopGuideBlock($draw = true) { $page = Application::Get('page'); $output = ''; $inquiry_category = isset($_POST['inquiry_category']) ? $_POST['inquiry_category'] : ''; if (Modules::IsModuleInstalled('inquiries') && in_array($page, array('home', 'inquiry_send', 'inquiry_form', 'inquiry_send')) && Application::Get('customer') == '') { // prepare categories array $objCategories = Categories::Instance(); $total_categories = $objCategories->GetAllExistingCategories(); $arr_categories = array(); foreach ($total_categories as $key => $val) { if ($val['level'] == '1') { $arr_categories[$val['id']] = $val['name']; } else { if ($val['level'] == '2') { $arr_categories[$val['id']] = ' • ' . $val['name']; } else { if ($val['level'] == '3') { $arr_categories[$val['id']] = ' :: ' . $val['name']; } } } } $output .= ' <table id="guide-block"> <tr> <td width="33%"> <div class="steps step1' . ($page == 'inquiry_form' ? ' active' : '') . '"> <div class="header">' . _STEP . ' 1</div> <div class="content">' . _STEP_1_DESCRIPTION . '</div> </div> </td> <td width="34%"> <div class="steps step2' . ($page == 'inquiry_send' ? ' active' : '') . '"> <div class="header">' . _STEP . ' 2</div> <div class="content">' . _STEP_2_DESCRIPTION . '</div> </div> </td> <td width="33%"> <div class="steps step3"> <div class="header">' . _STEP . ' 3</div> <div class="content">' . _STEP_3_DESCRIPTION . '</div> </div> </td> </tr>'; if ($page == 'home') { $output .= '<tr> <td colspan="3"> <div class="footer"> <div class="content"> <form name="frmGideBlock" action="index.php?page=inquiry_form" method="post"> ' . draw_token_field(false) . ' ' . _WHAT_DO_YOU_NEED . ' '; $output .= '<select name="inquiry_category">'; $output .= '<option value="">-- ' . _SELECT . ' --</option>'; foreach ($arr_categories as $key => $val) { $output .= '<option value="' . $key . '"' . ($inquiry_category == $key ? ' selected="selected"' : '') . '>' . $val . '</option>'; } $output .= '</select>'; $output .= ' <input type="submit" class="form_button" value="' . _SUBMIT . '"> </form> </div> </div> </td> </tr>'; } $output .= '</table>'; } if ($draw) { echo $output; } else { return $output; } }
/** * Draws all active plans * @param $draw */ public static function DrawPlans($draw = true) { $output = ''; $arr_durations = self::PrepareDurationsArray(); $default_payment_system = isset($_GET['payment_type']) ? $_GET['payment_type'] : ModulesSettings::Get('payments', 'default_payment_system'); $payment_type_online = ModulesSettings::Get('payments', 'payment_method_online'); $payment_type_paypal = ModulesSettings::Get('payments', 'payment_method_paypal'); $payment_type_2co = ModulesSettings::Get('payments', 'payment_method_2co'); $payment_type_authorize = ModulesSettings::Get('payments', 'payment_method_authorize'); $payment_type_cnt = ($payment_type_online === 'yes') + ($payment_type_paypal === 'yes') + ($payment_type_2co === 'yes') + ($payment_type_authorize === 'yes'); $exclude_free_plans = true; //($default_payment_system != 'online') ? true : false; $inquiry_field_visible = Modules::IsModuleInstalled('inquiries') == 'yes' ? true : false; $ratings_field_visible = Modules::IsModuleInstalled('ratings') == 'yes' ? true : false; $sql = 'SELECT ap.*, apd.name, apd.description FROM ' . TABLE_ADVERTISE_PLANS . ' ap LEFT OUTER JOIN ' . TABLE_ADVERTISE_PLANS_DESCRIPTION . ' apd ON ap.id = apd.advertise_plan_id AND apd.language_id = \'' . Application::Get('lang') . '\' WHERE 1=1 ORDER BY ap.id ASC'; //'.(($exclude_free_plans) ? ' AND ap.price != 0' : '' ).' $result = database_query($sql, DATA_AND_ROWS, ALL_ROWS); if ($result[1] > 0) { $output .= '<form name="frmAdvertiseForm" id="frmAdvertiseForm" action="index.php?customer=advertise_prepayment" method="post">'; $output .= draw_hidden_field('task', 'do_order', false); $output .= draw_token_field(false); $output .= '<div class="advertise_plans_container">'; $output .= '<table style="margin:7px 16px 0px 16px">'; $output .= '<tr><td>' . _CURRENCY . ':</td><td>' . Currencies::GetCurrenciesDDL(false) . '</td></tr>'; if ($payment_type_cnt >= 1) { ///onchange="appGoToPage(\'index.php?customer=advertise\',\'&payment_type=\'+this.value)" $output .= '<tr><td>' . _PAYMENT_TYPE . ': </td><td> <select name="payment_type" id="payment_type">'; if ($payment_type_online == 'yes') { $output .= '<option value="online" ' . ($default_payment_system == 'online' ? 'selected="selected"' : '') . '>' . _ONLINE_ORDER . '</option>'; } if ($payment_type_paypal == 'yes') { $output .= '<option value="paypal" ' . ($default_payment_system == 'paypal' ? 'selected="selected"' : '') . '>' . _PAYPAL . '</option>'; } if ($payment_type_2co == 'yes') { $output .= '<option value="2co" ' . ($default_payment_system == '2co' ? 'selected="selected"' : '') . '>2CO</option>'; } if ($payment_type_authorize == 'yes') { $output .= '<option value="authorize" ' . ($default_payment_system == 'authorize' ? 'selected="selected"' : '') . '>Authorize.Net</option>'; } $output .= '</select></td></tr>'; } else { $output .= '<tr><td colspan="2">'; $output .= draw_important_message(_NO_PAYMENT_METHODS_ALERT, false); $output .= '</td></tr>'; } $output .= '</table>'; $active_ind = '-1'; $output .= '<div class="plans_wrapper">'; $output .= '<h2>' . _SELECT_PLAN . '</h2>'; for ($i = 0; $i < $result[1]; $i++) { if ($result[0][$i]['price'] != 0 && $active_ind == '-1') { $active_ind = $i; } $duration = isset($arr_durations[$result[0][$i]['duration']]) ? $arr_durations[$result[0][$i]['duration']] : ''; $no_text = '<span class=no>' . _NO . '</span>'; $yes_text = '<span class=yes>' . _YES . '</span>'; $output .= ' <div class="item ' . ($i == $active_ind ? 'active' : ($result[0][$i]['price'] == 0 ? 'free' : '')) . '" id="item_' . $i . '"> <h3>' . $result[0][$i]['name'] . '</h3> <div class="item_text" title="' . _CLICK_TO_SELECT . '"> <label for="plan_' . $result[0][$i]['id'] . '"> ' . _DURATION . ': <b>' . $duration . '</b><br /> ' . _LISTINGS . ': <b>' . $result[0][$i]['listings_count'] . '</b><br /> ' . _CATEGORIES . ': <b>' . $result[0][$i]['categories_count'] . '</b><br /> ' . _KEYWORDS . ': <b>' . $result[0][$i]['keywords_count'] . '</b><br /> ' . _NAME . ': <b>' . ($result[0][$i]['business_name'] ? $yes_text : $no_text) . '</b><br /> ' . _DESCRIPTION . ': <b>' . ($result[0][$i]['business_description'] ? $yes_text : $no_text) . '</b><br /> ' . _LOGO . ': <b>' . ($result[0][$i]['logo'] ? $yes_text : $no_text) . '</b><br /> ' . _IMAGES . ': <b>' . $result[0][$i]['images_count'] . '</b><br /> ' . _VIDEO . ': <b>' . ($result[0][$i]['video_link'] ? $yes_text : $no_text) . '</b><br /> ' . _PHONE . ': <b>' . ($result[0][$i]['phone'] ? $yes_text : $no_text) . '</b><br /> ' . _ADDRESS . ': <b>' . ($result[0][$i]['address'] ? $yes_text : $no_text) . '</b><br /> ' . _MAP . ': <b>' . ($result[0][$i]['map'] ? $yes_text : $no_text) . '</b><br /> ' . ($inquiry_field_visible ? _INQUIRY_BUTTON . ': <b>' . ($result[0][$i]['inquiry_button'] ? $yes_text : $no_text) . '</b><br />' : '') . ' ' . ($inquiry_field_visible ? _INQUIRIES . '/' . _MONTH . ': <b>' . ($result[0][$i]['inquiries_count'] == '-1' ? '<span title="' . _UNLIMITED . '">∞</span>' : $result[0][$i]['inquiries_count']) . '</b><br />' : '') . ' ' . ($ratings_field_visible ? _RATING . ': <b>' . ($result[0][$i]['rating_button'] ? $yes_text : $no_text) . '</b><br />' : '') . ' ' . _PRICE . ': <b>' . Currencies::PriceFormat($result[0][$i]['price'] * Application::Get('currency_rate')) . '</b><br /> <div class="item_description">' . $result[0][$i]['description'] . '</div> </label> </div> <div class="item_radio">'; if ($result[0][$i]['price'] != 0) { $output .= '<input ' . ($i == $active_ind ? 'checked="checked"' : '') . ' type="radio" name="plan_id" id="plan_' . $result[0][$i]['id'] . '" value="' . $result[0][$i]['id'] . '" onclick="appSelectBlock(\'' . $i . '\');">'; } $output .= '</div> </div>'; } $output .= '</div>'; if ($payment_type_cnt >= 1) { $output .= '<div class="plan_button"><input type="submit" class="form_button" name="btnSubmit" value="' . _SUBMIT . '" /></div>'; } $output .= '</div>'; $output .= '</form><br /><br />'; } else { $output .= _NO_RECORDS_FOUND; } if ($draw) { echo $output; } else { $output; } }
/** * Draws sub categories * @param $category_id * @param $show_on * @param $draw */ public function DrawSubCategories($category_id = '0', $show_on = '', $draw = true) { global $objLogin; $listings_count_field = !$objLogin->IsLoggedIn() ? 'listings_count_public' : 'listings_count'; $lang = Application::Get('lang'); $output = ''; $categories_images = false; $categories_columns = '3'; if (Modules::IsModuleInstalled('listings')) { if (ModulesSettings::Get('listings', 'show_categories_images') == 'yes') { $categories_images = true; } $categories_columns = ModulesSettings::Get('listings', 'columns_number_on_page'); } $category_info = $this->GetInfoByID($category_id); $sql = 'SELECT c.id, c.icon, c.icon_thumb, c.listings_count, c.listings_count_public, c.priority_order, cd.language_id, cd.name, cd.description FROM ' . TABLE_CATEGORIES . ' c LEFT OUTER JOIN ' . TABLE_CATEGORIES_DESCRIPTION . ' cd ON c.id = cd.category_id WHERE c.parent_id = ' . (int) $category_id . ' AND cd.language_id = \'' . $lang . '\''; $result = database_query($sql, DATA_AND_ROWS, ALL_ROWS, FETCH_ASSOC); if ($result[1] > 0) { $output .= '<table class="sub_categories_table" width="100%" align="center" border="0" style="margin:10px auto">'; $output .= '<tr>'; for ($i = 0; $i < $result[1]; $i++) { if ($i > 0 && $i % $categories_columns == 0) { $output .= '</tr><tr>'; } $output .= '<td align="left" valign="top" width="32px">'; $icon_file_thumb = $result[0][$i]['icon_thumb'] != '' ? $result[0][$i]['icon_thumb'] : ''; if ($categories_images && $icon_file_thumb != '') { $output .= '<img src="images/categories/' . $icon_file_thumb . '" width="24px" height="24px" alt="' . $result[0][$i]['name'] . '" title="' . $result[0][$i]['name'] . '" />'; } else { $directory_icon = $result[0][$i][$listings_count_field] > 0 ? 'not_empty_directory.gif' : 'empty_directory.gif'; $output .= '<img src="images/categories/' . $directory_icon . '" width="24px" height="24px" alt="' . $result[0][$i]['name'] . '" title="' . $result[0][$i]['name'] . '" />'; } $output .= '</td>'; $output .= '<td>'; $output .= prepare_link('category', 'cid', $result[0][$i]['id'], '', $result[0][$i]['name'], '', '') . ' (' . $result[0][$i][$listings_count_field] . ')'; //$output .= ' '; //$output .= prepare_link('category', 'cid', $result[0][$i]['id'], '', '<img src=images/external_link.gif>', '', _VIEW_LISTINGS); $output .= '</td>'; } $output .= '</tr>'; $output .= '</table>'; } else { if ($show_on == '') { $output .= draw_message(_NO_SUBCATEGORIES, false, true) . '<br />'; } } if ($draw) { echo $output; } else { return $output; } }
// Draw top menu Menu::DrawTopMenu(); ?> </ul> <div class="slogan"> <?php if ($objLogin->IsLoggedInAsAdmin() && Application::Get('preview') == 'yes') { echo prepare_permanent_link('index.php?preview=no', _BACK_TO_ADMIN_PANEL, '', 'header'); } else { echo $objSiteDescription->GetParameter('slogan_text'); } ?> </div> <?php if (Modules::IsModuleInstalled('news') && ModulesSettings::Get('news', 'news_rss') == 'yes') { echo '<div class="rss"><a href="feeds/rss.xml"><img src="templates/' . Application::Get('template') . '/images/spacer.gif" title="RSS Feed" alt="RSS Feed" border="0" width="27" height="62" /></a></div>'; } ?> <div class="nav_language"> <?php $objLang = new Languages(); if ($objLang->GetLanguagesCount('front-end') > 1) { echo '<div style="padding-top:3px;margin:0px 6px;float:' . Application::Get('defined_left') . ';">' . _LANGUAGES . '</div>'; $path = 'page'; echo '<div style="padding-top:4px;float:left;">'; $objLang->DrawLanguagesBar($path); echo '</div>'; }
<?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'); //-------------------------------------------------------------------------- if ($objLogin->IsLoggedInAs('owner') && Modules::IsModuleInstalled('backup')) { $submition_type = isset($_POST['submition_type']) ? prepare_input($_POST['submition_type']) : ''; $backup_file = isset($_POST['backup_file']) ? prepare_input($_POST['backup_file']) : ''; $st = isset($_GET['st']) ? prepare_input($_GET['st']) : ''; $fname = isset($_GET['fname']) ? prepare_input($_GET['fname']) : ''; $msg = ''; $objBackup = new Backup(); if ($st == 'restore') { // restore previouse backup if ($objBackup->RestoreBackup($fname)) { $msg = draw_success_message(str_replace('_FILE_NAME_', $fname, _BACKUP_WAS_RESTORED), false); } else { $msg = draw_important_message($objBackup->error, false); } } else { $msg = draw_message(_BACKUP_RESTORE_NOTE, false); } // draw title bar and message draw_title_bar(prepare_breadcrumbs(array(_MODULES => '', _BACKUP => '', _BACKUP_RESTORE => '')), prepare_permanent_link('index.php?admin=mod_backup_installation', _BACKUP_INSTALLATION)); echo $msg;
/** * Draws FAQ list * @param $draw */ public static function DrawFaqList($draw = true) { $output = ''; $page_url = get_page_url(); if (Modules::IsModuleInstalled('faq')) { if (ModulesSettings::Get('faq', 'is_active') == 'yes') { $sql = 'SELECT fc.id as category_id, fc.name as category_name, fci.id as item_id, fci.faq_question, fci.faq_answer, fci.priority_order FROM ' . TABLE_FAQ_CATEGORY_ITEMS . ' fci INNER JOIN ' . TABLE_FAQ_CATEGORIES . ' fc ON fci.category_id = fc.id WHERE fc.is_active = 1 AND fci.is_active = 1 ORDER BY fc.priority_order ASC, fci.priority_order ASC '; $result = database_query($sql, DATA_AND_ROWS, ALL_ROWS); $count = 1; $current_category = ''; $output .= '<a name="up"></a>'; $output .= '<div class="faq_questions">'; for ($i = 0; $i < $result[1]; $i++) { if ($current_category == '') { $current_category = $result[0][$i]['category_name']; $output .= ($i > 0 ? '<br>' : '') . '<h3>' . $current_category . '</h3>'; } else { if ($current_category != $result[0][$i]['category_name']) { $current_category = $result[0][$i]['category_name']; $output .= ($i > 0 ? '<br>' : '') . '<h3>' . $current_category . '</h3>'; } } $output .= '<span> • </span><a href="' . $page_url . '#faq_' . $result[0][$i]['category_id'] . '_' . $result[0][$i]['item_id'] . '">' . str_replace('\\', '', $result[0][$i]['faq_question']) . '</a><br>'; } $output .= '</div>'; $current_category = ''; $draw_hr = true; $count = 1; for ($i = 0; $i < $result[1]; $i++) { if ($current_category == '') { $current_category = $result[0][$i]['category_name']; $draw_hr = false; $output .= '<br />' . draw_sub_title_bar($current_category, false); } else { if ($current_category != $result[0][$i]['category_name']) { $current_category = $result[0][$i]['category_name']; $draw_hr = false; $output .= '<br />' . draw_sub_title_bar($current_category, false); } else { $draw_hr = true; } } $output .= '<table width="100%" border="0" cellpadding="1" cellspacing="2"> ' . ($draw_hr ? '<tr align="left" valign="top"><td colspan="2"><hr size="1" style="color:#cccccc" noshade></td></tr>' : '') . ' <tr> <td><a name="faq_' . $result[0][$i]['category_id'] . '_' . $result[0][$i]['item_id'] . '"></a><strong>' . str_replace('\\', '', $result[0][$i]['faq_question']) . '</strong></td> </tr> <tr> <td>' . str_replace('\\', '', $result[0][$i]['faq_answer']) . '</td> </tr> <tr><td colspan="2" align="' . Application::Get('defined_right') . '"><a href="' . $page_url . '#up">top ^</a></td></tr> </table>'; } } } if ($draw) { echo $output; } else { return $output; } }
/** * Include style and javascript files */ public static function SetLibraries() { if (!Modules::IsModuleInstalled('gallery')) { return false; } $output = ''; $nl = "\n"; $image_gallery_type = ModulesSettings::Get('gallery', 'image_gallery_type'); $video_gallery_type = ModulesSettings::Get('gallery', 'video_gallery_type'); $output = ''; if ($image_gallery_type == 'lytebox') { $output .= '<!-- LyteBox v3.22 Author: Markus F. Hay Website: http://www.dolem.com/lytebox -->' . $nl; $output .= '<link rel="stylesheet" href="' . APPHP_BASE . 'modules/lytebox/css/lytebox.css" type="text/css" media="screen" />' . $nl; $output .= '<script type="text/javascript" src="' . APPHP_BASE . 'modules/lytebox/js/lytebox.js"></script>' . $nl; Application::Set('js_included', 'lytebox'); } if ($image_gallery_type == 'rokbox' || $video_gallery_type == 'rokbox' || $video_gallery_type == 'videobox') { $output .= '<script type="text/javascript" src="' . APPHP_BASE . 'js/mootools.js"></script>' . $nl; Application::Set('js_included', 'mootools'); } if ($image_gallery_type == 'rokbox' || $video_gallery_type == 'rokbox') { $output .= '<!-- RokBox -->' . $nl; $output .= '<link rel="stylesheet" href="' . APPHP_BASE . 'modules/rokbox/themes/dark/rokbox-style.css" type="text/css" />' . $nl; $output .= '<link rel="stylesheet" href="' . APPHP_BASE . 'modules/rokbox/themes/dark/rokbox-style-ie8.css" type="text/css" />' . $nl; $output .= '<script type="text/javascript" src="' . APPHP_BASE . 'modules/rokbox/rokbox.js"></script>' . $nl; $output .= '<script type="text/javascript" src="' . APPHP_BASE . 'modules/rokbox/rokbox-config.js"></script>' . $nl; Application::Set('js_included', 'rokbox'); } if ($video_gallery_type == 'videobox') { $output .= '<!-- VideoBox -->' . $nl; $output .= '<link rel="stylesheet" href="' . APPHP_BASE . 'modules/videobox/css/videobox.css" type="text/css" />' . $nl; $output .= '<script type="text/javascript" src="' . APPHP_BASE . 'modules/videobox/js/swfobject.js"></script>' . $nl; $output .= '<script type="text/javascript" src="' . APPHP_BASE . 'modules/videobox/js/videobox.js"></script>' . $nl; Application::Set('js_included', 'videobox'); } return $output; }
/** * Draws menus * @param $menu_position * @param $draw */ public static function DrawMenu($menu_position = 'left', $draw = true) { global $objSettings, $objLogin; $output = ''; if ($menu_position == 'left') { $objLogin->DrawLoginLinks(); } // Get all menus which have items (links to pages) $menus = self::GetMenus($menu_position); $menus_count = $menus[1]; $objNews = News::Instance(); $show_news_block = ModulesSettings::Get('news', 'show_news_block'); $show_subscribe_block = ModulesSettings::Get('news', 'show_newsletter_subscribe_block'); if (Modules::IsModuleInstalled('news') && ($show_news_block == 'right side' || $show_subscribe_block == 'right side')) { $menus_count++; } $show_inquiries_block = ModulesSettings::Get('inquiries', 'show_inquiries_block'); if (Modules::IsModuleInstalled('inquiries') && $show_inquiries_block == 'right side') { $menus_count++; } if (ModulesSettings::Get('listings', 'show_categories_side_block') == $menu_position . ' side') { $output .= Categories::DrawSideBlock(false); $menus_count++; } if (ModulesSettings::Get('listings', 'show_featured_block') == $menu_position . ' side') { $output .= Listings::DrawFeaturedBlock(false); $menus_count++; } if (ModulesSettings::Get('listings', 'show_recent_block') == $menu_position . ' side') { $output .= Listings::DrawRecentBlock(false); $menus_count++; } if (ModulesSettings::Get('listings', 'show_directory_statistics') == $menu_position . ' side') { $menus_count++; } if ($menus_count > 0) { $output .= '<div id="column-' . $menu_position . '-wrapper">'; } // Display all menu titles (names) according to their order for ($menu_ind = 0; $menu_ind < $menus[1]; $menu_ind++) { // Start draw new menu $output .= draw_block_top($menus[0][$menu_ind]['menu_name'], '', 'maximazed', false); $menu_links = self::GetMenuLinks($menus[0][$menu_ind]['id'], Application::Get('lang'), $menu_position); if ($menu_links[1] > 0) { $output .= '<ul>'; } for ($menu_link_ind = 0; $menu_link_ind < $menu_links[1]; $menu_link_ind++) { $class = Application::Get('page_id') == $menu_links[0][$menu_link_ind]['id'] ? ' active' : ''; if ($menu_links[0][$menu_link_ind]['content_type'] == 'link') { $output .= '<li>' . prepare_permanent_link($menu_links[0][$menu_link_ind]['link_url'], $menu_links[0][$menu_link_ind]['menu_link'], $menu_links[0][$menu_link_ind]['link_target'], 'main_menu_link' . $class) . '</li>'; } else { // draw current menu link $output .= '<li>' . prepare_link('pages', 'pid', $menu_links[0][$menu_link_ind]['id'], $menu_links[0][$menu_link_ind]['page_key'], $menu_links[0][$menu_link_ind]['menu_link'], 'main_menu_link' . $class) . '</li>'; } } if ($menu_links[1] > 0) { $output .= '</ul>'; } $output .= draw_block_bottom(false); } if ($menu_position == 'left') { if (!$objLogin->IsLoggedIn() || Application::Get('preview') == 'yes') { if (Modules::IsModuleInstalled('customers') && ModulesSettings::Get('customers', 'allow_login') == 'yes') { if (Application::Get('customer') != 'login') { $output .= Customers::DrawLoginFormBlock(false); } } } if (Modules::IsModuleInstalled('news')) { if ($show_news_block == 'left side') { $output .= $objNews->DrawNewsBlock(false); } if ($show_subscribe_block == 'left side') { $output .= $objNews->DrawSubscribeBlock(false); } } if (Modules::IsModuleInstalled('inquiries')) { if ($show_inquiries_block == 'left side') { $output .= Inquiries::DrawLastInquiriesBlock(false); } } } if ($menu_position == 'right') { if (Modules::IsModuleInstalled('inquiries')) { if ($show_inquiries_block == 'right side') { $output .= Inquiries::DrawLastInquiriesBlock(false); } } if (Modules::IsModuleInstalled('news')) { if ($show_news_block == 'right side') { $output .= $objNews->DrawNewsBlock(false); } if ($show_subscribe_block == 'right side') { $output .= $objNews->DrawSubscribeBlock(false); } } } if (ModulesSettings::Get('listings', 'show_directory_statistics') == $menu_position . ' side') { $output .= Listings::DrawDirectoryStatistics(false); } if ($menu_position == 'right') { if (Modules::IsModuleInstalled('adsense')) { $output .= '<div class="adsense-vertical">' . Adsense::GetVerticalBanerCode() . '</div>'; } } if ($menus_count > 0) { $output .= '</div>'; } $output .= '<br />'; if ($draw) { echo $output; } else { return $output; } }
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); } }
/** * Draw single listing * @param $draw */ public function DrawListing($draw = true) { $output = ''; $nl = "\n"; if (isset($this->listing_info[1]) && $this->listing_info[1] > 0) { // get info about some fields that depends on advertise plan $advertise_plan_info = AdvertisePlans::GetPlanInfo($this->GetField('advertise_plan_id')); $bpf_business_name = $advertise_plan_info[0]['business_name']; $bpf_business_description = $advertise_plan_info[0]['business_description']; $bpf_address = $advertise_plan_info[0]['address']; $bpf_logo = $advertise_plan_info[0]['logo']; $bpf_images_count = $advertise_plan_info[0]['images_count']; $bpf_phone = $advertise_plan_info[0]['phone']; $bpf_map = $advertise_plan_info[0]['map']; $bpf_video_link = $advertise_plan_info[0]['video_link']; $bpf_inquiry_button = $advertise_plan_info[0]['inquiry_button']; $bpf_rating_button = $advertise_plan_info[0]['rating_button']; $nl = "\n"; if ($bpf_logo && $bpf_images_count && !Application::Get('js_included', 'lytebox')) { $output .= '<!-- LyteBox v3.22 Author: Markus F. Hay Website: http://www.dolem.com/lytebox -->' . $nl; $output .= '<link rel="stylesheet" href="modules/lytebox/css/lytebox.css" type="text/css" media="screen" />' . $nl; $output .= '<script type="text/javascript" language="javascript" src="modules/lytebox/js/lytebox.js"></script>' . $nl; } if (Modules::IsModuleInstalled('ratings') == 'yes' && $bpf_rating_button) { $output .= '<link href="modules/ratings/css/ratings.css" rel="stylesheet" type="text/css" />'; if (Application::Get('lang_dir') == 'rtl') { $output .= '<link href="modules/ratings/css/ratings-rtl.css" rel="stylesheet" type="text/css" />'; } $ratings_lang = file_exists('modules/ratings/langs/' . Application::Get('lang') . '.js') ? Application::Get('lang') : 'en'; $output .= '<script src="modules/ratings/langs/' . $ratings_lang . '.js" type="text/javascript"></script>'; $output .= '<script src="modules/ratings/js/ratings.js" type="text/javascript"></script>'; } $output .= '<div class="listing_description">'; $output .= '<div class="wide_block">' . $nl; if ($bpf_rating_button) { $output .= '<div class="ratings_stars" id="rt_listing_' . $this->GetField('id') . '"></div>' . $nl; } if ($bpf_business_name) { $output .= '<h2>' . $this->GetField('business_name') . '</h2><br />' . $nl; } $output .= '<ul class="l_items">' . $nl; if ($bpf_address && $this->GetField('business_address') != '') { $output .= '<li><span class="l_item">' . _ADDRESS . ':</span> <span class="l_description">' . $this->GetField('business_address') . '</span></li>' . $nl; } if ($bpf_phone && $this->GetField('business_phone') != '') { $output .= '<li><span class="l_item">' . _PHONE . ':</span> <span class="l_description">' . $this->GetField('business_phone') . '</span></li>' . $nl; } if ($bpf_phone && $this->GetField('business_fax') != '') { $output .= '<li><span class="l_item">' . _FAX . ':</span> <span class="l_description">' . $this->GetField('business_fax') . '</span></li>' . $nl; } if ($this->GetField('website_url') != '') { $output .= '<li><span class="l_item">' . _WEB_SITE . ':</span> <span class="l_description"><a href="' . $this->GetField('website_url') . '" target="_blank">' . $this->GetField('website_url') . '</a> <img src="images/external_link.gif" alt="" /></span></li>' . $nl; } if ($this->GetField('business_email') != '') { $output .= '<li><span class="l_item">' . _EMAIL_ADDRESS . ':</span> <span class="l_description"><a href="mailto:' . $this->GetField('business_email') . '" target="_blank">' . $this->GetField('business_email') . '</a></span></li>' . $nl; } if ($bpf_video_link && $this->GetField('video_url') != '') { $output .= '<li><span class="l_item">' . _VIDEO . ':</span> <span class="l_description"><a href="' . $this->GetField('video_url') . '" target="_blank">' . $this->GetField('video_url') . '</a> <img src="images/external_link.gif" alt="" /></span></li>' . $nl; } $output .= '<li><span class="l_item">' . _LOCATION . ':</span> <span class="l_description">' . $this->GetField('listing_location') . '</span></li>' . $nl; $output .= '<li><span class="l_item">' . _SUB_LOCATION . ':</span> <span class="l_description">' . $this->GetField('listing_sub_location') . '</span></li>' . $nl; if ($this->GetField('date_published') != '0000-00-00 00:00:00') { $output .= '<li><span class="l_item">' . _PUBLISHED . ':</span> <span class="l_description">' . format_datetime($this->GetField('date_published'), get_datetime_format(false), _UNKNOWN) . '</span></li>' . $nl; } if ($bpf_business_description) { $output .= '<li><span class="l_item">' . _DESCRIPTION . ':</span> <br>' . $this->GetField('business_description') . '</li>' . $nl; } $added_categories = ListingsCategories::GetCategoriesForListing($this->GetField('id')); $arr_added_categories = array(); $output .= '<li><span class="l_item">' . _CATEGORIES . ':</span><br>'; $categories = ''; foreach ($added_categories[0] as $key => $val) { $categories .= !empty($categories) ? ', ' : ''; $categories .= prepare_link('category', 'cid', $val['category_id'], '', $val['name'], '', ''); } $output .= $categories; $output .= '</li>'; $output .= '</ul>'; $output .= '</div>'; $output .= '<div class="narrow_block">'; $output .= '<div class="listing_images_wrapper">'; if ($bpf_logo) { $image_file = $this->GetField('image_file') != '' ? $this->GetField('image_file') : ''; $image_file_thumb = $this->GetField('image_file_thumb') != '' ? $this->GetField('image_file_thumb') : 'no_image.png'; if (!empty($image_file)) { $output .= '<a href="images/listings/' . $image_file . '" rel="lyteshow' . $this->GetField('id') . '">'; } $output .= '<img class="listing_image' . ($image_file == '' ? ' no_hover' : '') . '" src="images/listings/' . $image_file_thumb . '" alt="" />'; if (!empty($image_file)) { $output .= '</a>'; } $output .= '<br />'; } $additional_images = array(); for ($i = 1; $i <= $bpf_images_count; $i++) { $additional_image = $this->GetField('image_' . $i) != '' ? $this->GetField('image_' . $i) : ''; $additional_image_thumb = $this->GetField('image_' . $i . '_thumb') != '' ? $this->GetField('image_' . $i . '_thumb') : ''; if ($additional_image != '') { $output .= '<a href="images/listings/' . $additional_image . '" rel="lyteshow' . $this->GetField('id') . '">'; $output .= '<img class="listing_icon" src="images/listings/' . $additional_image_thumb . '" alt="" />'; $output .= '</a>'; } } $output .= '</div>'; $map_code = $this->GetField('map_code', false); if ($bpf_map && $map_code != '') { $map_code = preg_replace('/width="(.*?)"/', 'width="240px"', $map_code); $map_code = preg_replace('/height="(.*?)"/', 'height="200px"', $map_code); $output .= '<div class="map">' . $map_code . '</div><br /><br />'; } if (Modules::IsModuleInstalled('inquiries') == 'yes' && $bpf_inquiry_button) { $output .= '<form name="frmDirectInquiry" action="index.php?page=inquiry_form" method="post">'; $output .= draw_token_field(false); $output .= draw_hidden_field('listing_id', $this->listing_info[0]['id'], false); $output .= draw_hidden_field('visitor_locations', $this->listing_info[0]['listing_location_id'], false); $output .= draw_hidden_field('visitor_sub_locations', $this->listing_info[0]['listing_sub_location_id'], false); $output .= draw_hidden_field('business_name', $this->GetField('business_name'), false); $output .= draw_hidden_field('inquiry_type', '1', false); $output .= '<center><input type="submit" class="form_button" value="' . _SUBMIT_INQUIRY . '"></center>'; $output .= '</form><br /><br />'; } $output .= '</div>'; $output .= '<div style="clear:both;"></div>'; $output .= '</div>'; } else { $output .= draw_important_message(_NO_LISTINGS_TO_DISPLAY, false); } if ($draw) { echo $output; } else { return $output; } }
/** * Draws the login links and logout form */ public function DrawLoginLinks() { if (Application::Get('preview') == 'yes') { return ''; } $menu_index = '0'; $text_align = Application::Get('lang_dir') == 'ltr' ? 'text-align:left;' : 'text-align:right;padding-right:15px;'; // --------------------------------------------------------------------- // MAIN ADMIN LINKS if ($this->IsLoggedInAsAdmin()) { draw_block_top(_MENUS . ': [ <a id="lnk_all_open" href="javascript:void(0);" onclick="javascript:toggle_menus(1)">' . _OPEN . '</a> | <a id="lnk_all_close" href="javascript:void(0);" onclick="javascript:toggle_menus(0)">' . _CLOSE . '</a> ]'); draw_block_bottom(); draw_block_top(_GENERAL, $menu_index++, 'maximized'); echo '<ul>'; echo '<li>' . $this->PrepareLink('home', _HOME) . '</li>'; if ($this->IsLoggedInAs('owner', 'mainadmin')) { echo '<li>' . $this->PrepareLink('settings', _SETTINGS) . '</li>'; } echo '<li>' . $this->PrepareLink('ban_list', _BAN_LIST) . '</li>'; if ($this->IsLoggedInAs('owner', 'mainadmin')) { echo '<li>' . $this->PrepareLink('countries_management', _COUNTRIES) . '</li>'; } echo '<li>' . prepare_permanent_link('index.php?preview=yes', _PREVIEW . ' <img src="images/external_link.gif" alt="" />') . '</li>'; echo '</ul>'; draw_block_bottom(); draw_block_top(_ACCOUNTS_MANAGEMENT, $menu_index++); echo '<div class="menu_category">'; echo '<ul>'; echo '<li>' . $this->PrepareLink('my_account', _MY_ACCOUNT) . '</li>'; if (Modules::IsModuleInstalled('customers') && $this->IsLoggedInAs('owner', 'mainadmin')) { echo '<li>' . $this->PrepareLink('statistics', _STATISTICS) . '</li>'; } if ($this->IsLoggedInAs('owner')) { echo '<li>' . $this->PrepareLink('roles_management', _ROLES_AND_PRIVILEGES, '', '', array('role_privileges_management')) . '</li>'; } echo '</ul>'; if ($this->IsLoggedInAs('owner', 'mainadmin')) { echo '<label>' . _ADMINS_MANAGEMENT . '</label>'; echo '<ul>'; echo '<li>' . $this->PrepareLink('admins_management', _ADMINS) . '</li>'; echo '</ul>'; } if (Modules::IsModuleInstalled('customers') && $this->IsLoggedInAs('owner', 'mainadmin')) { echo '<label>' . _CUSTOMERS_MANAGEMENT . '</label>'; echo '<ul>'; echo '<li>' . $this->PrepareLink('mod_customers_groups', _CUSTOMER_GROUPS) . '</li>'; echo '<li>' . $this->PrepareLink('mod_customers_management', _CUSTOMERS) . '</li>'; echo '</ul>'; } echo '</div>'; draw_block_bottom(); if ($this->IsLoggedInAs('owner', 'mainadmin')) { draw_block_top(_LISTINGS_MANAGEMENT, $menu_index++); echo '<div class="menu_category">'; if ($this->IsLoggedInAs('owner', 'mainadmin')) { echo '<label>' . _SETTINGS . '</label>'; echo '<ul>'; echo '<li>' . $this->PrepareLink('mod_listings_settings', _LISTINGS_SETTINGS) . '</li>'; echo '<li>' . $this->PrepareLink('mod_listings_locations', _LOCATIONS, '', '', array('mod_listings_sub_locations')) . '</li>'; if (Modules::IsModuleInstalled('inquiries')) { echo '<li>' . $this->PrepareLink('mod_listings_integration', _INTEGRATION) . '</li>'; } echo '</ul>'; } echo '<label>' . _LISTINGS . '</label>'; echo '<ul>'; echo '<li>' . $this->PrepareLink('mod_categories', _CATEGORIES) . '</li>'; echo '<li>' . $this->PrepareLink('mod_listings_management', _LISTINGS, '', '', array('mod_listings_categories')) . '</li>'; echo '</ul>'; echo '</div>'; draw_block_bottom(); } if (Modules::IsModuleInstalled('payments')) { draw_block_top(_PAYMENTS, $menu_index++); echo '<ul>'; if ($this->IsLoggedInAs('owner', 'mainadmin')) { echo '<li>' . $this->PrepareLink('mod_payments_currencies', _CURRENCIES) . '</li>'; echo '<li>' . $this->PrepareLink('mod_payments_advertise_plans', _ADVERTISE_PLANS) . '</li>'; echo '<li>' . $this->PrepareLink('mod_payments_orders', _ORDERS) . '</li>'; } echo '<li>' . $this->PrepareLink('mod_payments_statistics', _STATISTICS) . '</li>'; echo '</ul>'; draw_block_bottom(); } if ($this->HasPrivileges('add_menus') || $this->HasPrivileges('edit_menus') || $this->HasPrivileges('add_pages') || $this->HasPrivileges('edit_pages')) { draw_block_top(_MENUS_AND_PAGES, $menu_index++); echo '<div class="menu_category">'; if ($this->HasPrivileges('add_menus') || $this->HasPrivileges('edit_menus')) { echo '<label>' . _MENU_MANAGEMENT . '</label>'; echo '<ul>'; if ($this->HasPrivileges('add_menus')) { echo '<li>' . $this->PrepareLink('menus_add', _ADD_NEW_MENU) . '</li>'; } echo '<li>' . $this->PrepareLink('menus', _EDIT_MENUS, '', '', array('menus_edit')) . '</li>'; echo '</ul>'; } if ($this->HasPrivileges('add_pages') || $this->HasPrivileges('edit_pages')) { echo '<label>' . _PAGE_MANAGEMENT . '</label>'; echo '<ul>'; if ($this->HasPrivileges('add_pages')) { echo '<li>' . $this->PrepareLink('pages_add', _PAGE_ADD_NEW) . '</li>'; } if ($this->HasPrivileges('edit_pages')) { echo '<li>' . $this->PrepareLink('pages_edit', _PAGE_EDIT_HOME, 'type=home') . '</li>'; } echo '<li>' . $this->PrepareLink('pages', _PAGE_EDIT_PAGES, 'type=general') . '</li>'; if ($this->HasPrivileges('edit_pages')) { echo '<li>' . $this->PrepareLink('pages', _PAGE_EDIT_SYS_PAGES, 'type=system') . '</li>'; } if ($this->HasPrivileges('edit_pages')) { echo '<li>' . $this->PrepareLink('pages_trash', _TRASH) . '</li>'; } echo '</ul>'; } echo '</div>'; draw_block_bottom(); } draw_block_top(_LANGUAGES_SETTINGS, $menu_index++); echo '<ul>'; if ($this->IsLoggedInAs('owner', 'mainadmin')) { echo '<li>' . $this->PrepareLink('languages', _LANGUAGES, '', '', array('languages_add', 'languages_edit')) . '</li>'; } echo '<li>' . $this->PrepareLink('vocabulary', _VOCABULARY, 'filter_by=A') . '</li>'; echo '</ul>'; draw_block_bottom(); if ($this->IsLoggedInAs('owner', 'mainadmin')) { draw_block_top(_MASS_MAIL_AND_TEMPLATES, $menu_index++); echo '<ul>'; if ($this->IsLoggedInAs('owner', 'mainadmin')) { echo '<li>' . $this->PrepareLink('email_templates', _EMAIL_TEMPLATES) . '</li>'; } if ($this->IsLoggedInAs('owner', 'mainadmin')) { echo '<li>' . $this->PrepareLink('mass_mail', _MASS_MAIL) . '</li>'; } echo '</ul>'; draw_block_bottom(); } // MODULES $sql = 'SELECT * FROM ' . TABLE_MODULES . ' WHERE is_installed = 1 AND is_system = 0 ORDER BY priority_order ASC'; $modules = database_query($sql, DATA_AND_ROWS, ALL_ROWS); $modules_output = ''; for ($i = 0; $i < $modules[1]; $i++) { $output = ''; if ($modules[0][$i]['settings_access_by'] == '' || $modules[0][$i]['settings_access_by'] != '' && $this->IsLoggedInAs($modules[0][$i]['settings_access_by'])) { if ($modules[0][$i]['settings_const'] != '') { $output .= '<li>' . $this->PrepareLink($modules[0][$i]['settings_page'], constant($modules[0][$i]['settings_const'])) . '</li>'; } } if ($modules[0][$i]['management_access_by'] == '' || $modules[0][$i]['management_access_by'] != '' && $this->IsLoggedInAs($modules[0][$i]['management_access_by'])) { $management_pages = explode(',', $modules[0][$i]['management_page']); $management_consts = explode(',', $modules[0][$i]['management_const']); $management_pages_total = count($management_pages); for ($j = 0; $j < $management_pages_total; $j++) { if (isset($management_pages[$j]) && isset($management_consts[$j]) && $management_consts[$j] != '') { $output .= '<li>' . $this->PrepareLink($management_pages[$j], constant($management_consts[$j])) . '</li>'; } } } if ($output) { $modules_output .= '<label>' . constant($modules[0][$i]['name_const']) . '</label>'; $modules_output .= '<ul>' . $output . '</ul>'; } } if (!empty($modules_output)) { draw_block_top(_MODULES, $menu_index++); if ($this->IsLoggedInAs('owner', 'mainadmin')) { echo '<ul>'; echo '<li>' . $this->PrepareLink('modules', _MODULES_MANAGEMENT) . '</li>'; echo '</ul>'; } echo '<div class="menu_category">' . $modules_output . '</div>'; draw_block_bottom(); } } // --------------------------------------------------------------------- // CUSTOMER LINKS if ($this->IsLoggedInAsCustomer()) { draw_block_top(_MY_ACCOUNT); echo '<ul>'; echo '<li>' . prepare_permanent_link('index.php?page=home', _HOME, '', Application::Get('page') == 'home' && Application::Get('customer') == '' ? 'active' : '') . '</li>'; echo '<li>' . $this->PrepareLink('home', _DASHBOARD) . '</li>'; echo '<li>' . $this->PrepareLink('my_account', _EDIT_MY_ACCOUNT) . '</li>'; echo '<li>' . $this->PrepareLink('my_listings', _MY_LISTINGS, '', '', array('listings_categories')) . '</li>'; if (Modules::IsModuleInstalled('payments') && ModulesSettings::Get('payments', 'is_active') == 'yes') { echo '<li>' . $this->PrepareLink('advertise', _ADVERTISE, '', '', array('advertise_prepayment', 'order_proccess')) . '</li>'; echo '<li>' . $this->PrepareLink('my_orders', _MY_ORDERS) . '</li>'; } if (Modules::IsModuleInstalled('inquiries')) { echo '<li>' . $this->PrepareLink('inquiries', _INQUIRIES) . '</li>'; } echo '</ul>'; draw_block_bottom(); } // Logout if ($this->IsLoggedIn()) { draw_block_top_empty(); echo '<form action="index.php" method="post"> ' . draw_hidden_field('submit_logout', 'logout', false) . ' ' . draw_token_field(false) . ' <input class="form_button" type="submit" name="btnLogout" value="' . _BUTTON_LOGOUT . '" /> </form>'; draw_block_bottom(); echo '<br />'; } $this->activeMenuCount = $menu_index; }
<?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'); //-------------------------------------------------------------------------- if ($objLogin->IsLoggedInAs('owner', 'mainadmin') && Modules::IsModuleInstalled('contact_us')) { $action = MicroGrid::GetParameter('action'); $rid = MicroGrid::GetParameter('rid'); $mode = 'view'; $msg = ''; $objContactSettings = new ModulesSettings('contact_us'); if ($action == 'add') { $mode = 'add'; } else { if ($action == 'create') { if ($objContactSettings->AddRecord()) { $msg = draw_success_message(_ADDING_OPERATION_COMPLETED, false); $mode = 'view'; } else { $msg = draw_important_message($objContactSettings->error, false); $mode = 'add'; } } else { if ($action == 'edit') { $mode = 'edit';
<?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); }
<?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'));
<?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'); //-------------------------------------------------------------------------- if ($objLogin->IsLoggedInAs('owner', 'mainadmin') && Modules::IsModuleInstalled('gallery')) { $action = MicroGrid::GetParameter('action'); $rid = MicroGrid::GetParameter('rid'); $mode = 'view'; $msg = ''; $objGallery = new ModulesSettings('gallery'); if ($action == 'add') { $mode = 'add'; } else { if ($action == 'create') { if ($objGallery->AddRecord()) { $msg = draw_success_message(_ADDING_OPERATION_COMPLETED, false); $mode = 'view'; } else { $msg = draw_important_message($objGallery->error, false); $mode = 'add'; } } else { if ($action == 'edit') { $mode = 'edit';
</td> </tr> <tr> <td><?php echo _ACCESS; ?> :</td> <td colspan="2"> <?php echo Pages::DrawPageAccessSelectBox($objPage->GetParameter('access_level')); ?> </td> </tr> <?php if (Modules::IsModuleInstalled('comments')) { if (ModulesSettings::Get('comments', 'comments_allow') == 'yes') { echo '<tr><td nowrap="nowrap">' . _ALLOW_COMMENTS . ':</td> <td nowrap="nowrap"> <input type="radio" class="form_radio" name="comments_allowed" id="comments_allowed_1" ' . ($objPage->GetParameter('comments_allowed') == '0' ? 'checked="checked"' : '') . ' value="0" /> <label for="comments_allowed_1">' . _NO . '</label> </td> <td> <input type="radio" class="form_radio" name="comments_allowed" id="comments_allowed_2" ' . ($objPage->GetParameter('comments_allowed') == '1' ? 'checked="checked"' : '') . ' value="1" /> <label for="comments_allowed_2" id="comments_allowed_3">' . _YES . '</label> </td></tr>'; } } ?> <?php } ?> <tr>