xxxxxxxxxx
<?php require './header.php';
?>
<div id="Body">
<div id="Content">
<div id="Slider">
<div class="Slider">
<ul id="sb-slider" class="sb-slider">
<li><a href="#"><img src="images/slider/File1.png" alt=""></a></li>
<li><a href="#"><img src="images/slider/File2.png" alt=""></a></li>
<li><a href="#"><img src="images/slider/File7.png" alt=""></a></li>
<li><a href="#"><img src="images/slider/File4.png" alt=""></a></li>
<li><a href="#"><img src="images/slider/File5.png" alt=""></a></li>
</ul>
</div>
xxxxxxxxxx
// html_entity_decode (php)
Ex:
<style>
.red {
color: red;
}
.bold {
font-weight: bold;
}
</style>
<?php
echo "<font class='red bold'> * required </font>";
?>
xxxxxxxxxx
<?php
/**
* Front to the WordPress application. This file doesn't do anything, but loads
* wp-blog-header.php which does and tells WordPress to load the theme.
*
* @package WordPress
*/
/**
* Tells WordPress to load the WordPress theme and output it.
*
* @var bool
*/
define( 'WP_USE_THEMES', true );
/** Loads the WordPress Environment and Template */
require __DIR__ . '/wp-blog-header.php';
xxxxxxxxxx
<div class="container margin-b70">
<div class="row">
<div class="col-md-12">
<?php error_reporting(0); ?>
<h1>Data Awal</h1>
xxxxxxxxxx
echo " <div class=\"content-page\"><div class=\"content boxed-layout-ext\"><div class=\"container-fluid\">
";
xxxxxxxxxx
<?php
echo " <div class=\"content-page\"><div class=\"content boxed-layout-ext\"><div class=\"container-fluid\">
";
?>
xxxxxxxxxx
<!DOCTYPE html>
<html>
<body>
<?php
$x = "Hello world!";
$y = 'Hello world!';
echo $x;
echo "<br>";
echo $y;
?>
</body>
</html>
xxxxxxxxxx
<?php
/**
* The main template file.
*
* This is the most generic template file in a WordPress theme
* and one of the two required files for a theme (the other being style.css).
* It is used to display a page when nothing more specific matches a query.
* E.g., it puts together the home page when no home.php file exists.
* Learn more: http://codex.wordpress.org/Template_Hierarchy
*
* In this theme we use it as home.php, archive.php and search.php to reduce number of templates
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
} // Exit if accessed directly
global $posterity_a13;
$ajax_call = false;
if(isset( $_REQUEST['a13-ajax-get']) ){
$ajax_call = true;
}
if($ajax_call) {
posterity_display_items_from_query_post_list();
//send also current pagination when ajax call
the_posts_pagination();
posterity_result_count();
}
else{
$_title = '';
//Lets decide what is the title
if ( is_search() ) {
/* Search Count */
$all_search = new WP_Query( "s=$s&showposts=-1" );
$count = $all_search->post_count;
/* translators: %1$d number of results, %2$s search query */
$_title = sprintf( esc_html( _n( '%1$d search result for "%2$s"', '%1$d search results for "%2$s"', $count, 'posterity' ) ), $count, get_search_query() );
} elseif ( is_archive() ) {
if ( is_author() ) {
/* translators: %s - author name */
$_title = sprintf( esc_html__( 'Author Archives: %s', 'posterity' ), "<span class='vcard'>" . get_the_author() . "</span>" );
} elseif ( is_category() ) {
/* translators: %s - category name */
$_title = sprintf( esc_html__( 'Category Archives: %s', 'posterity' ), '<span>' . single_cat_title( '', false ) . '</span>' );
} elseif ( is_tag() ) {
/* translators: %s - tag name */
$_title = sprintf( esc_html__( 'Tag Archives: %s', 'posterity' ), '<span>' . single_tag_title( '', false ) . '</span>' );
} elseif ( is_day() ) {
/* translators: %s - day */
$_title = sprintf( esc_html__( 'Daily Archives: %s', 'posterity' ), '<span>' . get_the_date() . '</span>' );
} elseif ( is_month() ) {
/* translators: %s - month */
$_title = sprintf( esc_html__( 'Monthly Archives: %s', 'posterity' ), '<span>' . get_the_date( 'F Y' ) . '</span>' );
} elseif ( is_year() ) {
/* translators: %s - year */
$_title = sprintf( esc_html__( 'Yearly Archives: %s', 'posterity' ), '<span>' . get_the_date( 'Y' ) . '</span>' );
} else {
$_title = esc_html__( 'Blog Archives', 'posterity' );
}
}
$lazy_load = $posterity_a13->get_option('blog_lazy_load') === 'on';
$pagination_class = $lazy_load? ' lazy-load-on' : '';
get_header();
// Elementor `archive` location
if ( ! function_exists( 'elementor_theme_do_location' ) || ! elementor_theme_do_location( 'archive' ) ){
posterity_title_bar( 'outside', $_title );
?>
<article id="content" class="clearfix">
<div class="content-limiter">
<div id="col-mask">
<div class="content-box<?php echo esc_attr( $pagination_class ); ?>">
<?php
posterity_display_items_from_query_post_list();
?>
<div class="clear"></div>
<?php the_posts_pagination();
posterity_result_count(); ?>
</div>
<?php get_sidebar(); ?>
</div>
</div>
</article>
<?php
}
get_footer();
}
xxxxxxxxxx
<?php
$DB_HOST = 'localhost';
$DB_USER = 'root';
$DB_PASS = '';
$DB_NAME = 'dbgmu';
/*try{
$DB_con = new PDO("mysql:host={$DB_HOST};dbname={$DB_NAME}",$DB_USER,$DB_PASS);
$DB_con->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
}
catch(PDOException $e){
echo $e->getMessage();
}
*/
$options = array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8');
try { $DB_con = new PDO("mysql:host={$DB_HOST};dbname={$DB_NAME};charset=utf8", $DB_USER, $DB_PASS, $options); }
catch(PDOException $ex){ die("Failed to connect to the database: " . $ex->getMessage());}
$DB_con->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$DB_con->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_ASSOC);
?>
xxxxxxxxxx
<?php
header('Content-type: application/xml; charset="ISO-8859-1"',true);
?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc><?= base_url() ?></loc>
<lastmod><?= date('d-m-Y H:i:s') ?></lastmod>
<changefreq>daily</changefreq>
<priority>0.1</priority>
</url>
<?php foreach($post as $item) {?>
<url>
<loc><?= base_url('post/'.$item['post_slug']) ?></loc>
<lastmod><?= $item['created_at'] ?></lastmod>
<changefreq>daily</changefreq>
<priority>0.1</priority>
</url>
<?php } ?>
</urlset>