public function all_pages_read()
 {
     if ($this->auth()) {
         $pages = get_available_pages();
         $wrapper = array('status' => 'success', 'message' => 'all_pages_read ok', 'response' => $pages);
         return json_encode($wrapper);
     }
 }
Example #2
0
        }
    }
}
$smarty->assign('_countries', $_countries);
//serve the available pages from the template or the engine
function get_available_pages($arrPaths)
{
    $arrFiles = array();
    foreach ($arrPaths as $path) {
        if (!empty($path)) {
            $arrDirs = scandir($path);
            foreach ($arrDirs as $file) {
                $extension = pathinfo($file, PATHINFO_EXTENSION);
                if ($extension == 'html' | 'htm' | 'tpl') {
                    $arrFiles[] = $file;
                }
            }
            break;
        }
    }
    return $arrFiles;
}
// fill the pages select
$list_pages = get_available_pages(array($path1, $path2));
$_pages = "<option value='' selected='selected'>All pages</option>";
if (!empty($list_pages)) {
    foreach ($list_pages as $page) {
        $_pages .= "<option value='{$page}'>{$page}</option>";
    }
}
$smarty->assign('_pages', $_pages);
Example #3
0
    public function showImSettings()
    {
        if (file_exists(ITEMDATAFILE)) {
            $category_file = getXML(ITEMDATAFILE);
            $file_url = $category_file->item->pageurl;
            $file_title = $category_file->item->title;
            $file_page = $category_file->item->pageurl;
            $file_page_details = $category_file->item->detailspage;
            $file_results_page = $category_file->item->resultspage;
        }
        ?>
		<h3>Item Manager Settings</h3>
		<form class="largeform" action="load.php?id=item_manager&settings&settings_edit" method="post" accept-charset="utf-8">
			<div class="leftsec">
				<p>
					<label for="page-url">Choose Item Manager Title</label>
					<input type="text" class="text" name="item-title" value="<?php 
        echo $file_title;
        ?>
" />
				</p>
			</div>
		 <div class="rightsec">
			<p>
			  <label for="page-url">Choose Page To Display Results</label>
			  
			  <select class="text" name="page-url">

			  <?php 
        $pages = get_available_pages();
        foreach ($pages as $page) {
            $slug = $page['slug'];
            if ($slug == $file_url) {
                echo "<option value=\"{$slug}\" selected=\"selected\">{$slug}</option>\n";
            } else {
                echo "<option value=\"{$slug}\">{$slug}</option>\n";
            }
        }
        ?>
			  </select>
			</p>
		  </div>
		 <div class="leftsec">
			<p>
			  <label for="page-url">Choose Page To Display <strong>Details Page</strong></label>
			  
			  <select class="text" name="detailspage">

			  <?php 
        $pages = get_available_pages();
        foreach ($pages as $page) {
            $slug = $page['slug'];
            if ($slug == $file_page_details) {
                echo "<option value=\"{$slug}\" selected=\"selected\">{$slug}</option>\n";
            } else {
                echo "<option value=\"{$slug}\">{$slug}</option>\n";
            }
        }
        ?>
			  </select>
			</p>
		  </div>  
		  <div class="clear"></div>
		  <h2 style="margin-bottom:0px"><strong>Advanced Settings</strong></h2>
		 <div class="leftsec">
			<p style="margin-top:0px">
			  <h3>Results Page Coding</h3>
			  <p style="width:600px;"><strong>This Feature Should Be Used By Experianced Users Only<br/><br />
			  1. You can use any html, css, javascript, or php in this textarea<br/><br />
			  2. The Title Field Can Be Retrieved By Typing <?php 
        highlight_string('<?php echo $data->title; ?>');
        ?>
<br /><br />
			  3. The Category Field Can Be Retrieved By Typing <?php 
        highlight_string('<?php echo $data->category; ?>');
        ?>
<br /><br />
			  4. Custom Fields Can Be Retrieved By Tpying <?php 
        highlight_string('<?php echo $data->nameofcustomfield; ?>');
        ?>
<br /><br />
			  5. The Category Field Can Be Retrieved By Typing <?php 
        highlight_string('<?php echo $data->category; ?>');
        ?>
<br /><br />
			  6. The CONTENT Of The Post Can Be Retrieved By Typing <?php 
        highlight_string('<?php echo $content; ?>');
        ?>
<br /><br />
			  7. The URL Of The Post Can Be Retrieved By Typing <?php 
        highlight_string('<?php echo $url; ?>');
        ?>
<br /><br />
			  </strong></p>
		 <textarea name="resultspage">
		  <?php 
        echo stripcslashes($file_results_page);
        ?>
		 </textarea>
			</p>
		  </div>  
			<div class="clear"></div>
		  <p>
			<span>
			  <input class="submit" type="submit" name="settings_edit" value="Submit Settings" />
			</span>
		  </p>
		</form>
		<?php 
    }
Example #4
0
}
$xml = simplexml_load_file(GSDATAOTHERPATH . '/calendar.xml');
$setLang = $xml->lang;
$setPage = $xml->page;
$setPageEvents = $xml->pageEvents;
?>
<form class="largeform" id="settings" action="load.php?id=calendar&settings" method="post" accept-charset="utf-8">
    <div class="leftsec">
        <p>
            <label><?php 
i18n('calendar/page_name');
?>
:</label>
            <select class="text" name="page">
                <?php 
$pages = get_available_pages();
foreach ($pages as $page) {
    $slug = $page['slug'];
    if ($slug == $setPage) {
        echo '<option value="' . $slug . '" selected="selected">' . $slug . '</option>\\n';
    } else {
        echo '<option value="' . $slug . '">' . $slug . '</option>\\n';
    }
}
?>
            </select>
        </p>
    </div>
    <div class="rightsec">
        <p>
            <label><?php 
Example #5
0
/** 
* Settings panel for admin area
* 
* @return void
*/
function show_settings_admin()
{
    global $SITEURL;
    $Blog = new Blog();
    if (isset($_POST['blog_settings'])) {
        $prettyurls = isset($_POST['pretty_urls']) ? $_POST['pretty_urls'] : '';
        $blog_settings_array = array('blogurl' => $_POST['blog_url'], 'lang' => $_POST['language'], 'excerptlength' => $_POST['excerpt_length'], 'postformat' => $_POST['show_excerpt'], 'postperpage' => $_POST['posts_per_page'], 'recentposts' => $_POST['recent_posts'], 'prettyurls' => $prettyurls, 'autoimporter' => $_POST['auto_importer'], 'autoimporterpass' => $_POST['auto_importer_pass'], 'displaytags' => $_POST['show_tags'], 'rsstitle' => $_POST['rss_title'], 'rssdescription' => $_POST['rss_description'], 'comments' => $_POST['comments'], 'disqusshortname' => $_POST['disqus_shortname'], 'disquscount' => $_POST['disqus_count'], 'sharethis' => $_POST['sharethis'], 'sharethisid' => $_POST['sharethis_id'], 'addthis' => $_POST['addthis'], 'addthisid' => $_POST['addthis_id'], 'addata' => $_POST['ad_data'], 'allpostsadtop' => $_POST['all_posts_ad_top'], 'allpostsadbottom' => $_POST['all_posts_ad_bottom'], 'postadtop' => $_POST['post_ad_top'], 'postadbottom' => $_POST['post_ad_bottom'], 'postthumbnail' => $_POST['post_thumbnail'], 'displaydate' => $_POST['display_date'], 'previouspage' => $_POST['previous_page'], 'nextpage' => $_POST['next_page'], 'displaycss' => $_POST['display_css'], 'csscode' => $_POST['css_code'], 'rssfeedposts' => $_POST['rss_feed_num_posts'], 'customfields' => $_POST['custom_fields'], 'blogpage' => $_POST['blog_page'], 'displayreadmore' => $_POST['display_read_more'], 'readmore' => $_POST['read_more_text'], 'archivepostcount' => $_POST['display_archives_post_count'], 'postdescription' => $_POST['post_description']);
        $Blog->saveSettings($blog_settings_array);
    }
    ?>
	<h3><?php 
    i18n(BLOGFILE . '/BLOG_SETTINGS');
    ?>
</h3>
	<form class="largeform" action="load.php?id=blog&settings" method="post" accept-charset="utf-8">
		<div class="leftsec">
			<p>
				<label for="page-url"><?php 
    i18n(BLOGFILE . '/PAGE_URL');
    ?>
:</label>
				<select class="text" name="blog_url">
					<?php 
    $pages = get_available_pages();
    foreach ($pages as $page) {
        $slug = $page['slug'];
        if ($slug == $Blog->getSettingsData("blogurl")) {
            echo "<option value=\"{$slug}\" selected=\"selected\">{$slug}</option>\n";
        } else {
            echo "<option value=\"{$slug}\">{$slug}</option>\n";
        }
    }
    ?>
				</select>
			</p>
		</div>
		<div class="rightsec">
			<p>
				<label for="language"><?php 
    i18n(BLOGFILE . '/LANGUAGE');
    ?>
</label>
				<select class="text" name="language">
					<?php 
    $languages = $Blog->blog_get_languages();
    foreach ($languages as $lang) {
        if ($lang == $Blog->getSettingsData("lang")) {
            echo '<option value="' . $lang . '" selected="selected">' . $lang . '</option>';
        } else {
            echo '<option value="' . $lang . '">' . $lang . '</option>';
        }
    }
    ?>
				</select>
			</p>
		</div>
		<div class="clear"></div>
		<div class="leftsec">
			<p>
				<label for="excerpt_length"><?php 
    i18n(BLOGFILE . '/EXCERPT_LENGTH');
    ?>
:</label>
				<input class="text" type="text" name="excerpt_length" value="<?php 
    echo $Blog->getSettingsData("excerptlength");
    ?>
" />
			</p>
		</div>
		<div class="rightsec">
			<p>
				<label for="show_excerpt"><?php 
    i18n(BLOGFILE . '/EXCERPT_OPTION');
    ?>
:</label>
				<input name="show_excerpt" type="radio" value="Y" <?php 
    if ($Blog->getSettingsData("postformat") == 'Y') {
        echo 'checked="checked"';
    }
    ?>
 style="vertical-align: middle;" />
				&nbsp;<?php 
    i18n(BLOGFILE . '/FULL_TEXT');
    ?>
				<span style="margin-left: 30px;">&nbsp;</span>
				<input name="show_excerpt" type="radio" value="N" <?php 
    if ($Blog->getSettingsData("postformat") != 'Y') {
        echo 'checked="checked"';
    }
    ?>
 style="vertical-align: middle;" />
				&nbsp;<?php 
    i18n(BLOGFILE . '/EXCERPT');
    ?>
			</p>
		</div>
		<div class="clear"></div>
		<div class="leftsec">
			<p>
				<label for="posts_per_page"><?php 
    i18n(BLOGFILE . '/POSTS_PER_PAGE');
    ?>
:</label>
				<input class="text" type="text" name="posts_per_page" value="<?php 
    echo $Blog->getSettingsData("postperpage");
    ?>
" />
			</p>
		</div>
		<div class="rightsec">
			<p>
				<label for="recent_posts"><?php 
    i18n(BLOGFILE . '/RECENT_POSTS');
    ?>
:</label>
				<input class="text" type="text" name="recent_posts" value="<?php 
    echo $Blog->getSettingsData("recentposts");
    ?>
" />
			</p>
		</div>
		<div class="clear"></div>
		<div class="leftsec">
			<p>
				<label for="auto_importer"><?php 
    i18n(BLOGFILE . '/RSS_IMPORTER');
    ?>
:</label>
				<input name="auto_importer" type="radio" value="Y" <?php 
    if ($Blog->getSettingsData("autoimporter") == 'Y') {
        echo 'checked="checked"';
    }
    ?>
 style="vertical-align: middle;" />
				&nbsp;<?php 
    i18n(BLOGFILE . '/YES');
    ?>
				<span style="margin-left: 30px;">&nbsp;</span>
				<input name="auto_importer" type="radio" value="N" <?php 
    if ($Blog->getSettingsData("autoimporter") != 'Y') {
        echo 'checked="checked"';
    }
    ?>
 style="vertical-align: middle;" />
				&nbsp;<?php 
    i18n(BLOGFILE . '/NO');
    ?>
			</p>
		</div>
		<div class="rightsec">
			<p>
				<label for="recent_posts"><?php 
    i18n(BLOGFILE . '/RSS_IMPORTER_PASS');
    ?>
:</label>
				<input class="text" type="text" name="auto_importer_pass" value="<?php 
    echo $Blog->getSettingsData("autoimporterpass");
    ?>
" />
			</p>
		</div>
		<div class="clear"></div>
		<div class="leftsec">
			<p>
				<label for="posts_per_page"><?php 
    i18n(BLOGFILE . '/DISPLAY_TAGS_UNDER_POST');
    ?>
:</label>
				<input name="show_tags" type="radio" value="Y" <?php 
    if ($Blog->getSettingsData("displaytags") == 'Y') {
        echo 'checked="checked"';
    }
    ?>
 style="vertical-align: middle;" />
				&nbsp;<?php 
    i18n(BLOGFILE . '/YES');
    ?>
				<span style="margin-left: 30px;">&nbsp;</span>
				<input name="show_tags" type="radio" value="N" <?php 
    if ($Blog->getSettingsData("displaytags") != 'Y') {
        echo 'checked="checked"';
    }
    ?>
 style="vertical-align: middle;" />
				&nbsp;<?php 
    i18n(BLOGFILE . '/NO');
    ?>
			</p>
		</div>
		<div class="rightsec">
			<p>
				<label for="post_thumbnail"><?php 
    i18n(BLOGFILE . '/POST_THUMBNAIL');
    ?>
:</label>
				<input name="post_thumbnail" type="radio" value="Y" <?php 
    if ($Blog->getSettingsData("postthumbnail") == 'Y') {
        echo 'checked="checked"';
    }
    ?>
 style="vertical-align: middle;" />
				&nbsp;<?php 
    i18n(BLOGFILE . '/YES');
    ?>
				<span style="margin-left: 30px;">&nbsp;</span>
				<input name="post_thumbnail" type="radio" value="N" <?php 
    if ($Blog->getSettingsData("postthumbnail") != 'Y') {
        echo 'checked="checked"';
    }
    ?>
 style="vertical-align: middle;" />
				&nbsp;<?php 
    i18n(BLOGFILE . '/NO');
    ?>
			</p>
		</div>
		<div class="clear"></div>
		<div class="leftsec">
			<p>
				<label for="display_date"><?php 
    i18n(BLOGFILE . '/DISPLAY_DATE');
    ?>
:</label>
				<input name="display_date" type="radio" value="Y" <?php 
    if ($Blog->getSettingsData("displaydate") == 'Y') {
        echo 'checked="checked"';
    }
    ?>
 style="vertical-align: middle;" />
				&nbsp;<?php 
    i18n(BLOGFILE . '/YES');
    ?>
				<span style="margin-left: 30px;">&nbsp;</span>
				<input name="display_date" type="radio" value="N" <?php 
    if ($Blog->getSettingsData("displaydate") != 'Y') {
        echo 'checked="checked"';
    }
    ?>
 style="vertical-align: middle;" />
				&nbsp;<?php 
    i18n(BLOGFILE . '/NO');
    ?>
			</p>
		</div>
		<div class="rightsec">
			<p>
				<label for="display_archives_post_count"><?php 
    i18n(BLOGFILE . '/DISPLAY_POST_COUNT_ARCHIVES');
    ?>
:</label>
				<input name="display_archives_post_count" type="radio" value="Y" <?php 
    if ($Blog->getSettingsData("archivepostcount") == 'Y') {
        echo 'checked="checked"';
    }
    ?>
 style="vertical-align: middle;" />
				&nbsp;<?php 
    i18n(BLOGFILE . '/YES');
    ?>
				<span style="margin-left: 30px;">&nbsp;</span>
				<input name="display_archives_post_count" type="radio" value="N" <?php 
    if ($Blog->getSettingsData("archivepostcount") != 'Y') {
        echo 'checked="checked"';
    }
    ?>
 style="vertical-align: middle;" />
				&nbsp;<?php 
    i18n(BLOGFILE . '/NO');
    ?>
			</p>
		</div>
		<div class="clear"></div>
		<div class="leftsec">
			<p>
				<label for="display_read_more"><?php 
    i18n(BLOGFILE . '/DISPLAY_READ_MORE_LINK');
    ?>
:</label>
				<input name="display_read_more" type="radio" value="Y" <?php 
    if ($Blog->getSettingsData("displayreadmore") == 'Y') {
        echo 'checked="checked"';
    }
    ?>
 style="vertical-align: middle;" />
				&nbsp;<?php 
    i18n(BLOGFILE . '/YES');
    ?>
				<span style="margin-left: 30px;">&nbsp;</span>
				<input name="display_read_more" type="radio" value="N" <?php 
    if ($Blog->getSettingsData("displayreadmore") != 'Y') {
        echo 'checked="checked"';
    }
    ?>
 style="vertical-align: middle;" />
				&nbsp;<?php 
    i18n(BLOGFILE . '/NO');
    ?>
			</p>
		</div>
		<div class="rightsec">
			<p>
				<label for="read_more_text"><?php 
    i18n(BLOGFILE . '/READ_MORE_LINK_TEXT');
    ?>
:</label>
				<input class="text" type="text" name="read_more_text" value="<?php 
    echo $Blog->getSettingsData("readmore");
    ?>
" />
			</p>
		</div>
		<div class="clear"></div>
		<div class="leftsec">
			<p>
				<label for="post_description"><?php 
    i18n(BLOGFILE . '/POST_DESCRIPTION');
    ?>
:</label>
				<input name="post_description" type="radio" value="Y" <?php 
    if ($Blog->getSettingsData("postdescription") == 'Y') {
        echo 'checked="checked"';
    }
    ?>
 style="vertical-align: middle;" />
				&nbsp;<?php 
    i18n(BLOGFILE . '/YES');
    ?>
				<span style="margin-left: 30px;">&nbsp;</span>
				<input name="post_description" type="radio" value="N" <?php 
    if ($Blog->getSettingsData("postdescription") != 'Y') {
        echo 'checked="checked"';
    }
    ?>
 style="vertical-align: middle;" />
				&nbsp;<?php 
    i18n(BLOGFILE . '/NO');
    ?>
			</p>
		</div>
		<div class="clear"></div>
		<div class="leftsec">
			<p>
				<label for="previous_page"><?php 
    i18n(BLOGFILE . '/PREVIOUS_PAGE_TEXT');
    ?>
:</label>
				<input class="text" type="text" name="previous_page" value="<?php 
    echo $Blog->getSettingsData("previouspage");
    ?>
" />
			</p>
		</div>
		<div class="rightsec">
			<p>
				<label for="next_page"><?php 
    i18n(BLOGFILE . '/NEXT_PAGE_TEXT');
    ?>
:</label>
				<input class="text" type="text" name="next_page" value="<?php 
    echo $Blog->getSettingsData("nextpage");
    ?>
" />
			</p>
		</div>
		<div class="clear"></div>
		<h3><?php 
    i18n(BLOGFILE . '/RSS_FILE_SETTINGS');
    ?>
</h3>
		<div class="leftsec">
			<p>
				<label for="rss_title"><?php 
    i18n(BLOGFILE . '/RSS_TITLE');
    ?>
:</label>
				<input class="text" type="text" name="rss_title" value="<?php 
    echo $Blog->getSettingsData("rsstitle");
    ?>
" />
			</p>
		</div>
		<div class="rightsec">
			<p>
				<label for="rss_description"><?php 
    i18n(BLOGFILE . '/RSS_DESCRIPTION');
    ?>
:</label>
				<input class="text" type="text" name="rss_description" value="<?php 
    echo $Blog->getSettingsData("rssdescription");
    ?>
" />
			</p>
		</div>
		<div class="clear"></div>
		<div class="leftsec">
			<p>
				<label for="rss_feed_num_posts"><?php 
    i18n(BLOGFILE . '/RSS_FEED_NUM_POSTS');
    ?>
:</label>
				<input class="text" type="text" name="rss_feed_num_posts" value="<?php 
    echo $Blog->getSettingsData("rssfeedposts");
    ?>
" />
			</p>
		</div>
		<div class="clear"></div>
		<h3><?php 
    i18n(BLOGFILE . '/SOCIAL_SETTINGS');
    ?>
</h3>
		<div class="leftsec">
			<p>
				<label for="comments"><?php 
    i18n(BLOGFILE . '/DISPLAY_DISQUS_COMMENTS');
    ?>
:</label>
				<input name="comments" type="radio" value="Y" <?php 
    if ($Blog->getSettingsData("comments") == 'Y') {
        echo 'checked="checked"';
    }
    ?>
 style="vertical-align: middle;" />
				&nbsp;<?php 
    i18n(BLOGFILE . '/YES');
    ?>
				<span style="margin-left: 30px;">&nbsp;</span>
				<input name="comments" type="radio" value="N" <?php 
    if ($Blog->getSettingsData("comments") != 'Y') {
        echo 'checked="checked"';
    }
    ?>
 style="vertical-align: middle;" />
				&nbsp;<?php 
    i18n(BLOGFILE . '/NO');
    ?>
			</p>
		</div>
		<div class="rightsec">
			<p>
				<label for="disqus_shortname"><?php 
    i18n(BLOGFILE . '/DISQUS_SHORTNAME');
    ?>
:</label>
				<input class="text" type="text" name="disqus_shortname" value="<?php 
    echo $Blog->getSettingsData("disqusshortname");
    ?>
" />
			</p>
		</div>
		<div class="clear"></div>
		<div class="leftsec">
			<p>
				<label for="posts_per_page"><?php 
    i18n(BLOGFILE . '/DISPLAY_DISQUS_COUNT');
    ?>
:</label>
				<input name="disqus_count" type="radio" value="Y" <?php 
    if ($Blog->getSettingsData("disquscount") == 'Y') {
        echo 'checked="checked"';
    }
    ?>
 style="vertical-align: middle;" />
				&nbsp;<?php 
    i18n(BLOGFILE . '/YES');
    ?>
				<span style="margin-left: 30px;">&nbsp;</span>
				<input name="disqus_count" type="radio" value="N" <?php 
    if ($Blog->getSettingsData("disquscount") != 'Y') {
        echo 'checked="checked"';
    }
    ?>
 style="vertical-align: middle;" />
				&nbsp;<?php 
    i18n(BLOGFILE . '/NO');
    ?>
			</p>
		</div>
		<div class="clear"></div>
		<div class="leftsec">
			<p>
				<label for="sharethis"><?php 
    i18n(BLOGFILE . '/ENABLE_SHARE_THIS');
    ?>
:</label>
				<input name="sharethis" type="radio" value="Y" <?php 
    if ($Blog->getSettingsData("sharethis") == 'Y') {
        echo 'checked="checked"';
    }
    ?>
 style="vertical-align: middle;" />
				&nbsp;<?php 
    i18n(BLOGFILE . '/YES');
    ?>
				<span style="margin-left: 30px;">&nbsp;</span>
				<input name="sharethis" type="radio" value="N" <?php 
    if ($Blog->getSettingsData("sharethis") != 'Y') {
        echo 'checked="checked"';
    }
    ?>
 style="vertical-align: middle;" />
				&nbsp;<?php 
    i18n(BLOGFILE . '/NO');
    ?>
			</p>
		</div>
		<div class="rightsec">
			<p>
				<label for="sharethis_id"><?php 
    i18n(BLOGFILE . '/SHARE_THIS_ID');
    ?>
:</label>
				<input class="text" type="text" name="sharethis_id" value="<?php 
    echo $Blog->getSettingsData("sharethisid");
    ?>
" />
			</p>
		</div>
		<div class="clear"></div>
		<div class="leftsec">
			<p>
				<label for="addthis"><?php 
    i18n(BLOGFILE . '/ENABLE_ADD_THIS');
    ?>
:</label>
				<input name="addthis" type="radio" value="Y" <?php 
    if ($Blog->getSettingsData("addthis") == 'Y') {
        echo 'checked="checked"';
    }
    ?>
 style="vertical-align: middle;" />
				&nbsp;<?php 
    i18n(BLOGFILE . '/YES');
    ?>
				<span style="margin-left: 30px;">&nbsp;</span>
				<input name="addthis" type="radio" value="N" <?php 
    if ($Blog->getSettingsData("addthis") != 'Y') {
        echo 'checked="checked"';
    }
    ?>
 style="vertical-align: middle;" />
				&nbsp;<?php 
    i18n(BLOGFILE . '/NO');
    ?>
			</p>
		</div>
		<div class="rightsec">
			<p>
				<label for="addthis_id"><?php 
    i18n(BLOGFILE . '/ADD_THIS_ID');
    ?>
:</label>
				<input class="text" type="text" name="addthis_id" value="<?php 
    echo $Blog->getSettingsData("addthisid");
    ?>
" />
			</p>
		</div>
		<div class="clear"></div>
		<h3><?php 
    i18n(BLOGFILE . '/AD_TITLE');
    ?>
</h3>
		<div class="leftsec">
			<p>
				<label for="all_posts_ad_top"><?php 
    i18n(BLOGFILE . '/DISPLAY_ALL_POSTS_AD_TOP');
    ?>
:</label>
				<input name="all_posts_ad_top" type="radio" value="Y" <?php 
    if ($Blog->getSettingsData("allpostsadtop") == 'Y') {
        echo 'checked="checked"';
    }
    ?>
 style="vertical-align: middle;" />
				&nbsp;<?php 
    i18n(BLOGFILE . '/YES');
    ?>
				<span style="margin-left: 30px;">&nbsp;</span>
				<input name="all_posts_ad_top" type="radio" value="N" <?php 
    if ($Blog->getSettingsData("allpostsadtop") != 'Y') {
        echo 'checked="checked"';
    }
    ?>
 style="vertical-align: middle;" />
				&nbsp;<?php 
    i18n(BLOGFILE . '/NO');
    ?>
			</p>
		</div>
		<div class="rightsec">
			<p>
				<label for="all_posts_ad_bottom"><?php 
    i18n(BLOGFILE . '/DISPLAY_ALL_POSTS_AD_BOTTOM');
    ?>
:</label>
				<input name="all_posts_ad_bottom" type="radio" value="Y" <?php 
    if ($Blog->getSettingsData("allpostsadbottom") == 'Y') {
        echo 'checked="checked"';
    }
    ?>
 style="vertical-align: middle;" />
				&nbsp;<?php 
    i18n(BLOGFILE . '/YES');
    ?>
				<span style="margin-left: 30px;">&nbsp;</span>
				<input name="all_posts_ad_bottom" type="radio" value="N" <?php 
    if ($Blog->getSettingsData("allpostsadbottom") != 'Y') {
        echo 'checked="checked"';
    }
    ?>
 style="vertical-align: middle;" />
				&nbsp;<?php 
    i18n(BLOGFILE . '/NO');
    ?>
			</p>
		</div>
		<div class="clear"></div>
		<div class="leftsec">
			<p>
				<label for="post_ad_top"><?php 
    i18n(BLOGFILE . '/DISPLAY_POST_AD_TOP');
    ?>
:</label>
				<input name="post_ad_top" type="radio" value="Y" <?php 
    if ($Blog->getSettingsData("postadtop") == 'Y') {
        echo 'checked="checked"';
    }
    ?>
 style="vertical-align: middle;" />
				&nbsp;<?php 
    i18n(BLOGFILE . '/YES');
    ?>
				<span style="margin-left: 30px;">&nbsp;</span>
				<input name="post_ad_top" type="radio" value="N" <?php 
    if ($Blog->getSettingsData("postadtop") != 'Y') {
        echo 'checked="checked"';
    }
    ?>
 style="vertical-align: middle;" />
				&nbsp;<?php 
    i18n(BLOGFILE . '/NO');
    ?>
			</p>
		</div>
		<div class="rightsec">
			<p>
				<label for="post_ad_bottom"><?php 
    i18n(BLOGFILE . '/DISPLAY_POST_AD_BOTTOM');
    ?>
:</label>
				<input name="post_ad_bottom" type="radio" value="Y" <?php 
    if ($Blog->getSettingsData("postadbottom") == 'Y') {
        echo 'checked="checked"';
    }
    ?>
 style="vertical-align: middle;" />
				&nbsp;<?php 
    i18n(BLOGFILE . '/YES');
    ?>
				<span style="margin-left: 30px;">&nbsp;</span>
				<input name="post_ad_bottom" type="radio" value="N" <?php 
    if ($Blog->getSettingsData("postadbottom") != 'Y') {
        echo 'checked="checked"';
    }
    ?>
 style="vertical-align: middle;" />
				&nbsp;<?php 
    i18n(BLOGFILE . '/NO');
    ?>
			</p>
		</div>
		<div class="clear"></div>
		<div class="leftec" style="width:100%">
			<p>
				<label for="ad_data"><?php 
    i18n(BLOGFILE . '/AD_DATA');
    ?>
:</label>
				<textarea name="ad_data" class="text"  style="width:100%;height:100px;"><?php 
    echo $Blog->getSettingsData("addata");
    ?>
</textarea>
			</p>
		</div>
		<div class="clear"></div>
		<h3><?php 
    i18n(BLOGFILE . '/BLOG_PAGE');
    ?>
</h3>
		<div class="leftsec">
			<p>
				<label for="custom_fields"><?php 
    i18n(BLOGFILE . '/USE_CUSTOM_BLOG_PAGE');
    ?>
:</label>
				<input name="custom_fields" type="radio" value="Y" <?php 
    if ($Blog->getSettingsData("customfields") == 'Y') {
        echo 'checked="checked"';
    }
    ?>
 style="vertical-align: middle;" />
				&nbsp;<?php 
    i18n(BLOGFILE . '/YES');
    ?>
				<span style="margin-left: 30px;">&nbsp;</span>
				<input name="custom_fields" type="radio" value="N" <?php 
    if ($Blog->getSettingsData("customfields") != 'Y') {
        echo 'checked="checked"';
    }
    ?>
 style="vertical-align: middle;" />
				&nbsp;<?php 
    i18n(BLOGFILE . '/NO');
    ?>
			</p>
		</div>
		<div class="clear"></div>
		<div class="leftec" style="width:100%">
			<p>
				<label for="ad_data"><?php 
    i18n(BLOGFILE . '/BLOG_PAGE');
    ?>
: <span style="color:red;font-size:15px;"><?php 
    i18n(BLOGFILE . '/BLOG_PAGE_WARNING');
    ?>
</span></label>
				<label for="display_css"><a id="blog_page_help" href="#blog_page_help_data"><?php 
    i18n(BLOGFILE . '/DISPLAY_BLOG_PAGE_HELP');
    ?>
</a></label>
				<div style="display:none;">
					<div id="blog_page_help_data">
						<?php 
    blog_page_help_html();
    ?>
					</div>
				</div>
				<textarea name="blog_page" id="blog_page" style=""><?php 
    echo $Blog->getSettingsData("blogpage");
    ?>
</textarea>
			</p>
		</div>
		<div class="clear"></div>
		<h3><?php 
    i18n(BLOGFILE . '/CSS_SETTINGS');
    ?>
</h3>
		<div class="leftsec">
			<p>
				<label for="display_css"><?php 
    i18n(BLOGFILE . '/DISPLAY_CSS');
    ?>
: <a id="css_help" href="#css_data">Click here to view available classes and ids</a></label>
				<div style="display:none;">
					<div id="css_data">
						<h3>Available ids and classes</h3>
						<ul>
							<li>.blog_post_container (<?php 
    i18n(BLOGFILE . '/CSS_POST_CONTAINER_HINT');
    ?>
)</li>
							<li>.blog_post_title</li>
							<li>.blog_post_date</li>
							<li>.blog_post_content (<?php 
    i18n(BLOGFILE . '/CSS_POST_CONTENT_HINT');
    ?>
)</li>
							<li>.blog_tags</li>
							<li>.blog_page_navigation</li>
							<li>.blog_prev_page</li>
							<li>.blog_next_page</li>
							<li>.blog_go_back</li>
							<li>.blog_search_button</li>
							<li>.blog_search_input</li>
							<li>.blog_search_header</li>
							<li>#disqus_thread</li>
							<li>#blog_search (id of search form)</li>
						</ul><br/>
						<h3>Below is an example of a single blog post</h3>
<pre>
&lt;div class=&quot;blog_post_container&quot;&gt;<br />
	&lt;h3 class=&quot;blog_post_title&quot;&gt;&lt;a href=&quot;http://link&quot; class=&quot;blog_post_link&quot;&gt;The Post Title&lt;/a&gt;&lt;/h3&gt;<br />
	&lt;p class=&quot;blog_post_date&quot;&gt;<br />
		May 22, 2012			<br />
	&lt;/p&gt;<br />
	&lt;p class=&quot;blog_post_content&quot;&gt;<br />
		&lt;img src=&quot;http://michaelhenken.com/plugin_tests/blog/data/uploads/math-fail-pics-421.jpg&quot; style=&quot;&quot; class=&quot;blog_post_thumbnail&quot; /&gt;<br />
		An essential part of programming is evaluating conditions using if/else and switch/case statements. If / Else statements are easy to code and..	<br />
	&lt;/p&gt;<br />
&lt;/div&gt;<br />
&lt;p class=&quot;blog_tags&quot;&gt;<br />
	&lt;b&gt;Tags :&lt;/b&gt; <br />
	&lt;a href=&quot;http://link&quot;&gt;tags1&lt;/a&gt; &lt;a href=&quot;http://link&quot;&gt;tags2&lt;/a&gt;<br />
&lt;/p&gt;<br />
&lt;div class=&quot;blog_page_navigation&quot;&gt;		<br />
	&lt;div class=&quot;blog_prev_page&quot;&gt;<br />
		&lt;a href=&quot;http://link&quot;&gt;<br />
		&amp;larr; Older Posts		&lt;/a&gt;<br />
	&lt;/div&gt;<br />
	&lt;div class=&quot;blog_next_page&quot;&gt;<br />
		&lt;a href=&quot;http://link&quot;&gt;<br />
			Newer Posts &amp;rarr;<br />
		&lt;/a&gt;<br />
	&lt;/div&gt;<br />
&lt;/div&gt;
</pre>
				</div>
			</div>
				<script>
			      var editor = CodeMirror.fromTextArea(document.getElementById("blog_page"), {
			        lineNumbers: true,
			        matchBrackets: true,
			        mode: "application/x-httpd-php",
			        indentUnit: 4,
			        indentWithTabs: true,
			        enterMode: "keep",
			        tabMode: "shift",
			        lineWrapping: "true"
			      });
			    </script>

				<input name="display_css" type="radio" value="Y" <?php 
    if ($Blog->getSettingsData("displaycss") == 'Y') {
        echo 'checked="checked"';
    }
    ?>
 style="vertical-align: middle;" />
				&nbsp;<?php 
    i18n(BLOGFILE . '/YES');
    ?>
				<span style="margin-left: 30px;">&nbsp;</span>
				<input name="display_css" type="radio" value="N" <?php 
    if ($Blog->getSettingsData("displaycss") != 'Y') {
        echo 'checked="checked"';
    }
    ?>
 style="vertical-align: middle;" />
				&nbsp;<?php 
    i18n(BLOGFILE . '/NO');
    ?>
			</p>
		</div>
		<div class="clear"></div>
		<div class="leftec" style="width:100%">
			<p>
				<label for="css_code"><?php 
    i18n(BLOGFILE . '/CSS_CODE');
    ?>
:</label>
				<textarea name="css_code" class="text"  style="width:100%;height:100px;"><?php 
    echo $Blog->getSettingsData("csscode");
    ?>
</textarea>
			</p>
		</div>
		<div class="clear"></div>
		<h3><?php 
    i18n(BLOGFILE . '/HTACCESS_HEADLINE');
    ?>
</h3>
		<?php 
    global $PRETTYURLS;
    if ($PRETTYURLS == 1) {
        ?>
			<p class="inline">
				<input name="pretty_urls" type="checkbox" value="Y" <?php 
        if ($Blog->getSettingsData("prettyurls") == 'Y') {
            echo 'checked';
        }
        ?>
 />&nbsp;
				<label for="pretty_urls"><?php 
        i18n(BLOGFILE . '/PRETTY_URLS');
        ?>
</label> - 
				<span style="color:red;font-weight:bold;"><a id="see_htaccess" href="#htaccess">View What Your Sites .htaccess Should Be!</a></span> - 
				<span class="hint"><?php 
        i18n(BLOGFILE . '/PRETTY_URLS_PARA');
        ?>
</span>
			</p>
				<div style="display:none;">
				<div id="htaccess">
					<pre>
AddDefaultCharset UTF-8
Options -Indexes

# blocks direct access to the XML files - they hold all the data!
&lt;Files ~ "\.xml$"&gt;
    Order allow,deny
    Deny from all
    Satisfy All
&lt;/Files&gt;
&lt;Files sitemap.xml&gt;
    Order allow,deny
    Allow from all
    Satisfy All
&lt;/Files&gt;

RewriteEngine on

# Usually RewriteBase is just '/', but
# replace it with your subdirectory path -- IMPORTANT -> if your site is located in subfolder you need to change this to reflect (eg: /subfolder/)
RewriteBase /

RewriteRule ^<?php 
        if ($Blog->getSettingsData("blogurl") != 'index') {
            echo $Blog->getSettingsData("blogurl") . '/';
        }
        ?>
post/([^/.]+)/?$ index.php?id=<?php 
        echo $Blog->getSettingsData("blogurl");
        ?>
&post=$1 [L]
RewriteRule ^<?php 
        if ($Blog->getSettingsData("blogurl") != 'index') {
            echo $Blog->getSettingsData("blogurl") . '/';
        }
        ?>
tag/([^/.]+)/?$ index.php?id=<?php 
        echo $Blog->getSettingsData("blogurl");
        ?>
&tag=$1 [L]
RewriteRule ^<?php 
        if ($Blog->getSettingsData("blogurl") != 'index') {
            echo $Blog->getSettingsData("blogurl") . '/';
        }
        ?>
page/([^/.]+)/?$ index.php?id=<?php 
        echo $Blog->getSettingsData("blogurl");
        ?>
&page=$1 [L]
RewriteRule ^<?php 
        if ($Blog->getSettingsData("blogurl") != 'index') {
            echo $Blog->getSettingsData("blogurl") . '/';
        }
        ?>
archive/([^/.]+)/?$ index.php?id=<?php 
        echo $Blog->getSettingsData("blogurl");
        ?>
&archive=$1 [L]
RewriteRule ^<?php 
        if ($Blog->getSettingsData("blogurl") != 'index') {
            echo $Blog->getSettingsData("blogurl") . '/';
        }
        ?>
category/([^/.]+)/?$ index.php?id=<?php 
        echo $Blog->getSettingsData("blogurl");
        ?>
&category=$1 [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule /?([A-Za-z0-9_-]+)/?$ index.php?id=$1 [QSA,L]
					</pre>
				</div>
			</div>
			<?php 
    } else {
        echo '<p>' . i18n_r(BLOGFILE . '/BLOG_PRETTY_NOTICE') . '.</p>';
    }
    ?>
		<p>
		<span>
		<input class="submit" type="submit" name="blog_settings" value="<?php 
    i18n(BLOGFILE . '/SAVE_SETTINGS');
    ?>
" />
		</span>
		&nbsp;&nbsp;<?php 
    i18n(BLOGFILE . '/OR');
    ?>
&nbsp;&nbsp;
		<a href="load.php?id=blog&cancel" class="cancel"><?php 
    i18n(BLOGFILE . '/CANCEL');
    ?>
</a>
		</p>
	</form>
	<h3><?php 
    i18n(BLOGFILE . '/AUTO_IMPORTER_TITLE');
    ?>
</h3>
	<p>
		<?php 
    i18n(BLOGFILE . '/AUTO_IMPORTER_DESC');
    ?>
		<br/>
		<strong>lynx -dump <?php 
    echo $SITEURL;
    ?>
index.php?id=<?php 
    echo $Blog->getSettingsData("blogurl");
    ?>
&import=<?php 
    echo $Blog->getSettingsData("autoimporterpass");
    ?>
 > /dev/null</strong>
	</p>
	<script type="text/javascript">
		$("a#css_help").fancybox({
			'hideOnContentClick': true
		});
		$("a#blog_page_help").fancybox({
			'hideOnContentClick': true
		});
		$("a#see_htaccess").fancybox({
			'hideOnContentClick': true
		});
	</script>
<?php 
}