Esempio n. 1
0
<?php

global $wpdb, $signature;
$prefix = $wpdb->base_prefix;
$error = array();
$id = $_REQUEST['id'];
$st = Stardetail($id);
$star = $st[0]->star;
if (isset($_POST['registration'])) {
    $star = $_POST['star'];
    if (trim($star) == '') {
        array_push($error, 'Please enter star.');
    }
    if (count($error) <= 0) {
        $sql = "UPDATE `" . $prefix . "temple_stars` set star='{$star}' where id='{$id}'";
        $result = $wpdb->query($sql);
        $url = get_option('home') . '/wp-admin/admin.php?page=ManageStars&update=succ';
        echo "<script>window.location='" . $url . "'</script>";
    }
}
?>
<link href="<?php 
echo get_option('home');
?>
/wp-content/plugins/temple/css/pagedesign.css" rel="stylesheet"/>
<script type="text/javascript" src="<?php 
echo get_option('home');
?>
/wp-content/plugins/temple/js/jquery.js"></script>
<script type="text/javascript" src="<?php 
echo get_option('home');
$openinghours = $temple[0]->openinghours;
$address = $temple[0]->address;
$googleaddress = trim($temple[0]->googleaddress);
$phone = $temple[0]->phone;
$general_info = $temple[0]->general_info;
$description = $temple[0]->description;
$heighlight = $temple[0]->heighlight;
$latitude = $temple[0]->latitude;
$longitude = $temple[0]->longitude;
$location = $temple[0]->location;
$nearrailway = $temple[0]->nearrailway;
$nearairport = $temple[0]->nearairport;
$accomodation = $temple[0]->accomodation;
$post_id = $temple[0]->post_id;
$accomodats = unserialize($accomodation);
$stars = Stardetail();
$categories = Categorydetail();
$urchavar = Templeoption($temple_id, 'urchavar');
$mother = Templeoption($temple_id, 'mother');
$sacredtree = Templeoption($temple_id, 'sacredtree');
$tirtha = Templeoption($temple_id, 'tirtha');
$ecclesiasticus_pooja = Templeoption($temple_id, 'ecclesiasticus_pooja');
$creepy = Templeoption($temple_id, 'creepy');
$legendary_name = Templeoption($temple_id, 'legendary_name');
$trail = Templeoption($temple_id, 'trail');
$querystr = "SELECT * FROM " . $prefix . "temple_state";
$states = $wpdb->get_results($querystr, OBJECT);
$querystr1 = "SELECT * FROM " . $prefix . "temple_city";
$cities = $wpdb->get_results($querystr1, OBJECT);
$querystr2 = "SELECT * FROM " . $prefix . "temple_god";
$gods = $wpdb->get_results($querystr2, OBJECT);
the_title();
?>
</h1>
    <div class="science_box">
      <div class="all_temple1">
        <?php 
while (have_posts()) {
    the_post();
    the_content();
}
?>
      </div>
    </div>
	<div class="clr"></div>
	<?php 
$starts = Stardetail();
$star_id = '-1';
if (count($starts) > 0) {
    if (isset($_REQUEST['star']) && trim($_REQUEST['star']) != '' && trim($_REQUEST['star']) > 0) {
        $star_id = $_REQUEST['star'];
    } else {
        $star_id = $starts[0]->id;
    }
    ?>
	<ul class="districlist tabs">
		<?php 
    foreach ($starts as $star) {
        ?>
		<li<?php 
        if ($star_id == $star->id) {
            echo ' class="selected"';