";
echo "";
echo "";
echo '';
//wp_enqueue_script( "inline_edit","/wp-admin/js/inline-edit-post.min.js", array(),false, true );
}
function header_rss_feed() {
echo "";
$actual_link = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
$current_page_rajawi_admin=false;
if(isset($_REQUEST["page"]))
{
$mypages=array('rss_feed_menu');
if(in_array($_REQUEST["page"],$mypages))
$current_page_rajawi_admin=true;
}
}
/* Runs when plugin is activated */
register_activation_hook(__FILE__,'my_plugin_install');
/* Runs on plugin deactivation*/
register_deactivation_hook( __FILE__, 'my_plugin_remove' );
function my_plugin_install() {
import_tables("tables.sql");
}
function import_tables($filename,$tables = '*'){
$filename= rssfeed__PLUGIN_DIR.$filename;
require_once(rssfeed__PLUGIN_DIR."/includes.php");
if ($result = $db->db_query("SHOW TABLES LIKE 'rss_feed'")) {
if($result->num_rows == 1) {
//$db->db_query("DROP TABLE `rss_feed`");
return true;
}
}
$templine = '';
$lines = file($filename); // Read entire file
foreach ($lines as $line){
// Skip it if it's a comment
if (substr($line, 0, 2) == '--' || $line == '' || substr($line, 0, 2) == '/*' )
continue;
// Add this line to the current segment
$templine .= $line;
// If it has a semicolon at the end, it's the end of the query
if (substr(trim($line), -1, 1) == ';')
{
$db->db_query($templine);
$templine = '';
}
}
}
function my_plugin_remove()
{
}
?>