File: /datos/www/www.colombia.co/public_html/wp-content/plugins/ai-related-posts/admin/advanced.php
<?php
if ( !function_exists( 'add_action' ) ) {
exit;
}
//function start
function DCRP_plugin_advSettings() {
?>
<div class="wrap projectStyle">
<div id="whiteboxH" class="postbox">
<div class="topHead">
<h2><?php echo esc_html__("AI Related Posts Plugin - Settings", "DCRP-plugin") ?></h2>
<?php settings_errors(); ?>
</div>
<div class="topHead settingsPanel"> <nav id="nav" class="clearfix">
<ul class="clearfix">
<li><a href="<?php echo admin_url( 'admin.php?page=DCRP_plugin_dashboard' ) ?>"><?php echo esc_html__("Dashboard", "DCRP-plugin") ?></a></li>
<li><a href="<?php echo admin_url( 'admin.php?page=DCRP_plugin_editor' ) ?>"><?php echo esc_html__("Shortcode Generator", "DCRP-plugin") ?></a></li>
<?php if( get_option("DCRP_advSettings") == 1) { ?>
<li><a class="hover" href="<?php echo admin_url( 'admin.php?page=DCRP_plugin_advSettings' ) ?>"><?php echo esc_html__("Advanced Settings", "DCRP-plugin") ?></a></li>
<?php } ?>
</ul>
</nav>
</div>
<div class="inside"><?php if( get_option("DCRP_start") == 1) { ?>
<form action="options.php" method="post">
<?php settings_fields("DCRP_adv_settings");?>
<?php if( get_option("DCRP_advSettings") == 1) { ?>
<table class="form-table">
<tr valign="top"><strong><h1 class="h1TextHead"><?php echo esc_html__("Algorithm Settings", "DCRP-plugin") ?></h1></strong><p class="alertText"><?php echo esc_html__("Please make the settings carefully.","DCRP-plugin") ?></p><br></tr>
<tr valign="top">
<th scope="row"><label for="DCRP_suggestType"><?php echo esc_html__("Recommendation Type","DCRP-plugin") ?></label></th>
<td>
<label>
<select name="DCRP_suggestType">
<option value="1" <?php selected( get_option("DCRP_suggestType"), 1); ?>><?php echo esc_html__("Categories","DCRP-plugin") ?></option>
<option value="2" <?php selected( get_option("DCRP_suggestType"), 2); ?>><?php echo esc_html__("Tags","DCRP-plugin") ?></option>
</select>
</label>
<p><?php echo esc_html__("This plugin saves post categories (or tags) according to the posts visited. It then shows the post recommendations according to these settings. Select a setting to save.","DCRP-plugin");?></p>
<p><i><strong><?php echo esc_html__("Default: Categories (The Categories option is recommended.)","DCRP-plugin") ?></strong></i></p>
</td>
</tr>
<tr>
<th scope="row"><label for="DCRP_suggestComment"><?php echo esc_html__("Commented Posts","DCAS-plugin") ?></label></th>
<td>
<label class="button-toggle-wrap">
<input <?php if( get_option("DCRP_suggestComment") == 1) {echo 'checked="checked"';} ?> value="1" name="DCRP_suggestComment" class="toggler" type="checkbox" data-toggle="button-toggle"/>
<div class="button-toggle">
<div class="handle">
<div class="bars"></div>
</div>
</div>
</label>
<p class="description"><?php echo esc_html__("If the user has previously commented on any post, show them similar posts.","DCAS-plugin") ?></p>
<p><i><strong><?php echo esc_html__("Default: Yes","DCAS-plugin") ?></strong></i></p>
</td>
</tr>
<tr>
<th scope="row"><label for="DCRP_suggestCat"><?php echo esc_html__("Visited Category/Tag Pages","DCAS-plugin") ?></label></th>
<td>
<label class="button-toggle-wrap">
<input <?php if( get_option("DCRP_suggestCat") == 1) {echo 'checked="checked"';} ?> value="1" name="DCRP_suggestCat" class="toggler" type="checkbox" data-toggle="button-toggle"/>
<div class="button-toggle">
<div class="handle">
<div class="bars"></div>
</div>
</div>
</label>
<p class="description"><?php echo esc_html__("If the user has previously visited any category (or tags), show posts about those categories (or tags). It works according to the settings you set in the Recommendation Type option.","DCAS-plugin") ?></p>
<p><i><strong><?php echo esc_html__("Default: Yes","DCAS-plugin") ?></strong></i></p>
</td>
</tr>
<tr>
<th scope="row"><label for="DCRP_suggestSea"><?php echo esc_html__("Search Results","DCAS-plugin") ?></label></th>
<td>
<label class="button-toggle-wrap">
<input <?php if( get_option("DCRP_suggestSea") == 1) {echo 'checked="checked"';} ?> value="1" name="DCRP_suggestSea" class="toggler" type="checkbox" data-toggle="button-toggle"/>
<div class="button-toggle">
<div class="handle">
<div class="bars"></div>
</div>
</div>
</label>
<p class="description"><?php echo esc_html__("If a user searches on the website, show posts according to the search results.","DCAS-plugin") ?></p>
<p><i><strong><?php echo esc_html__("Default: Yes","DCAS-plugin") ?></strong></i></p>
</td>
</tr>
<tr valign="top">
<th scope="row"><label for="DCRP_suggestTime"><?php echo esc_html__("Browser Cookies","DCRP-plugin") ?></label></th>
<td>
<label>
<input name="DCRP_suggestTime" type="number" value="<?php echo esc_attr(get_option("DCRP_suggestTime")) ?>" />
</label>
<p><?php echo esc_html__("Set the cookie time (seconds) for the user.","DCRP-plugin"); ?></p>
<p><i><strong><?php echo esc_html__("Default: 2629743 (2629743 seconds = 1 months)","DCRP-plugin") ?></strong></i></p>
</td>
</tr>
<tr valign="top">
<th scope="row"><label for="DCRP_idLimit"><?php echo esc_html__("ID Limit","DCRP-plugin") ?></label></th>
<td>
<label>
<input name="DCRP_idLimit" type="number" value="<?php echo esc_attr(get_option("DCRP_idLimit")) ?>" />
</label>
<p><?php echo esc_html__("Number of categories / tags to save. If you increase the number, the similarity of the recommended posts decreases.","DCRP-plugin"); ?></p>
<p><i><strong><?php echo esc_html__("Default: 10 (Recommended between 5-20)","DCRP-plugin") ?></strong></i></p>
</td>
</tr>
</table>
<?php } ?>
<?php } else { ?>
<p><?php echo esc_html__("Please enable the plugin from the Plugin Dashboard page.","DCRP-plugin") ?></p>
<?php } ?></div>
</div>
</div>
<div class="wrap projectStyle" id="whiteboxH">
<div class="postbox">
<div class="inside">
<div class="inlineblockSet">
<div class="contentDoYouLike">
<p><?php echo esc_html__("How would you rate this plugin?", "DCRP-plugin") ?></p>
</div>
<div class="wrapperDoYouLike">
<input type="checkbox" id="st1" value="1" />
<label for="st1"></label>
<input type="checkbox" id="st2" value="2" />
<label for="st2"></label>
<input type="checkbox" id="st3" value="3" />
<label for="st3"></label>
<input type="checkbox" id="st4" value="4" />
<label for="st4"></label>
<input type="checkbox" id="st5" value="5" />
<label for="st5"></label>
</div>
<a target="_blank" href="https://codecanyon.net/user/divcoderplugins/portfolio" class="sabutton button button-primary boxMarginSet"><?php echo esc_html__("Rate this plugin!", "DCRP-plugin") ?></a>
</div>
<?php submit_button() ?>
</form>
</div>
</div>
</div>
<?php }
add_action("admin_init","DCRP_styles_register");
function DCRP_styles_register() {
//register settings
register_setting("DCRP_adv_settings","DCRP_suggestType");
register_setting("DCRP_adv_settings","DCRP_suggestTime");
register_setting("DCRP_adv_settings","DCRP_idLimit");
register_setting("DCRP_adv_settings","DCRP_suggestComment");
register_setting("DCRP_adv_settings","DCRP_suggestCat");
register_setting("DCRP_adv_settings","DCRP_suggestSea");
}