예제 #1
0
    /**
     * Draw featured all links
     * 		@param $draw
     */
    public static function DrawRecentAll($draw = true)
    {
        global $objLogin;
        $show_expired_listings = ModulesSettings::Get('listings', 'show_expired_listings');
        echo '<table border="0" cellspacing="5">';
        echo '<tr><th></th><td colspan="3">' . draw_sub_title_bar(_RECENT_LISTINGS, false) . '</td></tr>';
        $where_condition = ' 1=1 ' . (!$objLogin->IsLoggedIn() ? ' AND access_level="public"' : '');
        $where_condition .= $show_expired_listings != 'yes' ? ' AND ((finish_publishing = \'0000-00-00 00:00:00\') OR (finish_publishing > \'' . date('Y-m-d H:i:s') . '\'))' : '';
        $result = self::GetAllListings($where_condition, 'date_published DESC', 100);
        if ($result[1] > 0) {
            echo '<tr>
					<th width="20px"></td>
					<th>' . _NAME . '</th>
					<th width="200px" align="center">' . _CATEGORY . '</th>
					<th width="200px" align="center">' . _DATE_PUBLISHED . '</th>
			</tr>';
            for ($i = 0; $i < $result[1] && $i < 100; $i++) {
                echo '<tr>
						<td align="right">' . ($i + 1) . '.</td>
						<td nowrap="nowrap">' . prepare_link('listing', 'lid', $result[0][$i]['id'], $result[0][$i]['business_name'], $result[0][$i]['business_name'], '') . '</td>
						<td align="center">' . $result[0][$i]['category_name'] . '</td>						
						<td align="center">' . format_datetime($result[0][$i]['date_published']) . '</td>						
				</tr>';
            }
            echo '<tr><td colspan="4">&nbsp;</td></tr>';
        } else {
            echo '<tr><td colspan="4">' . _NO_LISTINGS_TO_DISPLAY . '</td></tr>';
        }
        echo '</table>';
    }
예제 #2
0
    /**
     *	Draws all modules
     *		return: html output
     */
    public function DrawModules()
    {
        global $objLogin;
        $margin = 'margin:-97px 0px 0px -44px;';
        $nl = "\n";
        if ($this->modulesCount > 0) {
            $this->IncludeJSFunctions();
            echo '<form name="frmMicroGrid_' . $this->tableName . '" id="frmMicroGrid_' . $this->tableName . '" action="' . $this->formActionURL . '" method="post">' . $nl;
            draw_hidden_field($this->uPrefix . 'mg_action', 'view');
            echo $nl;
            draw_hidden_field('mg_rid', '');
            echo $nl;
            draw_hidden_field('mg_sorting_fields', 'id');
            echo $nl;
            draw_hidden_field('mg_sorting_types', '');
            echo $nl;
            draw_hidden_field('mg_page', '');
            echo $nl;
            draw_hidden_field('mg_operation', '');
            echo $nl;
            draw_hidden_field('mg_operation_type', '');
            echo $nl;
            draw_hidden_field('mg_operation_field', '');
            echo $nl;
            draw_hidden_field('mg_search_status', '');
            echo $nl;
            draw_hidden_field('mg_language_id', '');
            echo $nl;
            draw_hidden_field('mg_operation_code', self::GetRandomString(20));
            echo $nl;
            draw_token_field();
            echo $nl;
            echo '<table width="100%" border="0" cellspacing="0" cellpadding="1">';
            echo '<tr><td>';
            $modules_output = '';
            for ($i = 0; $i < $this->modules[1]; $i++) {
                if ($this->modules[0][$i]['is_system'] == '1') {
                    if ($objLogin->IsLoggedInAs($this->modules[0][$i]['settings_access_by'])) {
                        $modules_output .= '<div style="width:120px;float:' . Application::Get('defined_left') . ';text-align:center;margin:5px;">
							<div><b>' . decode_text(constant($this->modules[0][$i]['name_const'])) . '</b></div>
							<div><img src="images/modules_icons/' . $this->modules[0][$i]['icon_file'] . '" title="' . @decode_text(constant($this->modules[0][$i]['description_const'])) . '" alt="" style="cursor:help;margin:2px;border:1px solid #dedede"></div>
							<div>' . ($this->modules[0][$i]['is_installed'] == 1 ? '<img src="images/success_sign.gif" style="position:absolute;' . $margin . '" alt="">' : '<img src="images/error_sign.gif" style="position:absolute;' . $margin . '" alt="">') . '</div>
							<div><a href="javascript:void(0);" onclick="javascript:__mgDoPostBack(\'' . $this->tableName . '\', \'edit\', \'' . $this->modules[0][$i]['id'] . '\');">[ ' . _EDIT_WORD . ' ]</a></div>
						</div>';
                    }
                }
            }
            if ($modules_output != '') {
                echo draw_sub_title_bar(_SYSTEM_MODULES, false);
                echo $modules_output;
            }
            echo '</td></tr><tr><td>';
            $modules_output = '';
            for ($i = 0; $i < $this->modules[1]; $i++) {
                if ($this->modules[0][$i]['is_system'] == '0') {
                    if ($objLogin->IsLoggedInAs($this->modules[0][$i]['settings_access_by'])) {
                        $modules_output .= '<div style="width:120px;float:' . Application::Get('defined_left') . ';text-align:center;margin:5px;">
							<div><b>' . decode_text(constant($this->modules[0][$i]['name_const'])) . '</b></div>
							<div><img src="images/modules_icons/' . $this->modules[0][$i]['icon_file'] . '" title="' . @decode_text(constant($this->modules[0][$i]['description_const'])) . '" alt="" style="cursor:help;margin:2px;border:1px solid #dedede"></div>			
							<div>' . ($this->modules[0][$i]['is_installed'] == 1 ? '<img src="images/success_sign.gif" style="position:absolute;' . $margin . '" alt="">' : '<img src="images/error_sign.gif" style="position:absolute;' . $margin . '" alt="">') . '</div>
							<div><a href="javascript:void(0);" onclick="javascript:__mgDoPostBack(\'' . $this->tableName . '\', \'edit\', \'' . $this->modules[0][$i]['id'] . '\');">[ ' . _EDIT_WORD . ' ]</a></div>
						</div>';
                    }
                }
            }
            if ($modules_output != '') {
                echo draw_sub_title_bar(_ADDITIONAL_MODULES, false);
                echo $modules_output;
            }
            echo '</td></tr>';
            echo '</table>';
            echo '</form>' . $nl;
        }
    }
예제 #3
0
    /**
     *  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>&nbsp;&#8226;&nbsp;</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;
        }
    }
예제 #4
0
    ?>
"></td>
	</tr>
	<tr><td colspan="2">&nbsp;</td></tr>
	<tr>
		<td style="padding-left:0px;" colspan="2"><input class="form_button" type="submit" name="submit" value="<?php 
    echo _BUTTON_CHANGE;
    ?>
"></td>
	</tr>
	<tr><td colspan="2">&nbsp;</td></tr>	
	</table>	
	</form>

	<?php 
    draw_sub_title_bar(_CHANGE_YOUR_PASSWORD);
    ?>
	<form action="index.php?admin=my_account" method="post">
	<?php 
    draw_hidden_field('submit_type', '3');
    ?>
	<?php 
    draw_token_field();
    ?>
	<table width="100%" border="0" cellspacing="0" cellpadding="2" class="main_text">
	<tr>
		<td width="150px">&nbsp;<?php 
    echo _PASSWORD;
    ?>
 <span class="required">*</span>:</td>
		<td width="405px"><input class="form_text" name="password_one" type="password" size="25" maxlength="15"></td>