Пример #1
0
<?php

global $wpdb, $signature;
$prefix = $wpdb->base_prefix;
$id = $_REQUEST['id'];
$temgod = Statedetail($id);
$god = $temgod[0]->god;
$result = $wpdb->query("DELETE FROM `" . $prefix . "temple_god` where id='{$id}'");
if ($result == 1) {
    $url = get_option('home') . '/wp-admin/admin.php?page=ManageGod&del=succ';
    echo "<script>window.location='" . $url . "'</script>";
}
Пример #2
0
<?php

global $wpdb, $signature;
$prefix = $wpdb->base_prefix;
$error = array();
$id = $_REQUEST['id'];
$st = Statedetail($id);
$state = $st[0]->state;
if (isset($_POST['registration'])) {
    $state = $_POST['state'];
    if (trim($state) == '') {
        array_push($error, 'Please enter state.');
    }
    if (count($error) <= 0) {
        $sql = "UPDATE `" . $prefix . "temple_state` set state='{$state}' where id='{$id}'";
        $result = $wpdb->query($sql);
        $url = get_option('home') . '/wp-admin/admin.php?page=TempleState&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');
Пример #3
0
<?php

global $wpdb, $signature;
$prefix = $wpdb->base_prefix;
$error = array();
$id = $_REQUEST['id'];
$city = Citydetail($id);
$city_name = $city[0]->city;
$state_id = $city[0]->state_id;
$st = Statedetail($state_id);
$state = $st[0]->state;
$link = '&ho=listcity&state_id=' . $state_id;
$url = get_option('home') . '/wp-admin/admin.php?page=TempleState' . $link;
if (isset($_POST['registration'])) {
    $city = $_POST['city'];
    if (trim($city) == '') {
        array_push($error, 'Please enter city.');
    }
    if (count($error) <= 0) {
        $sql = "UPDATE `" . $prefix . "temple_city` set city='{$city}' where id='{$id}'";
        $result = $wpdb->query($sql);
        $url = $url . '&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 
Пример #4
0
<?php

@session_start();
global $wpdb, $post;
$prefix = $wpdb->base_prefix;
get_header();
$categories = categorydetail();
$states = Statedetail();
$seachtext = '';
$cnd = '';
$searchlink = '?s=';
if (isset($_REQUEST['s']) && trim($_REQUEST['s']) != '') {
    $seachtext = $_REQUEST['s'];
    $srchtext = strtolower($seachtext);
    $cnd .= " and ( (lower(name) like '%{$srchtext}%' || lower(address) like '%{$srchtext}%' || lower(description) like '%{$srchtext}%' || lower(inthetemple) like '%{$srchtext}%' || lower(openinghours) like '%{$srchtext}%' || lower(heighlight) like '%{$srchtext}%' || lower(location) like '%{$srchtext}%' || lower(nearrailway) like '%{$srchtext}%' || lower(nearairport) like '%{$srchtext}%' || lower(general_info) like '%{$srchtext}%') ) ";
    $searchlink = '?s=' . $seachtext;
}
$category_id = '';
if (isset($_REQUEST['category_id']) && trim($_REQUEST['category_id']) != '') {
    $category_id = $_REQUEST['category_id'];
    $cnd .= " and category_id='{$category_id}'";
    $searchlink .= '&category_id=' . $category_id;
}
$state_id = '';
if (isset($_REQUEST['state_id']) && trim($_REQUEST['state_id']) != '') {
    $state_id = $_REQUEST['state_id'];
    $cnd .= " and state_id='{$state_id}'";
    $searchlink .= '&state_id=' . $state_id;
}
$city_id = '';
if (isset($_REQUEST['city_id']) && trim($_REQUEST['city_id']) != '') {
    _e("State");
    ?>
</th>
            <th valign="top" align="left" style="border-left:1px solid #ccc;"><?php 
    _e("District");
    ?>
</th>
			<th valign="top" align="left" style="border-left:1px solid #ccc;"><?php 
    _e("Actions");
    ?>
</th>
		</tr>
	<?php 
    $cnt = $limitstart + 1;
    foreach ($cities as $city) {
        $st = Statedetail($city->state_id);
        ?>
	  <tr>
		<td valign="top" align="left" style="border-top:1px solid #ccc;">&nbsp;<?php 
        _e($cnt);
        ?>
</td>
		<td valign="top" align="left" style="border-top:1px solid #ccc; border-left:1px solid #ccc;"><?php 
        _e($st[0]->state);
        ?>
</td>
        <td valign="top" align="left" style="border-top:1px solid #ccc; border-left:1px solid #ccc;"><?php 
        _e($city->district);
        ?>
</td>
		<td valign="top" align="left" style="border-top:1px solid #ccc; border-left:1px solid #ccc;">
$temples = templedetail('', " and post_id='{$post_id}'");
$temple = $temples[0];
$temple_id = $temple->id;
$image = $temple->image;
$thumimage = $image;
$accomodation = $temple->accomodation;
$accomodats = unserialize($accomodation);
$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');
$states = Statedetail($temple->state_id);
$cities = Citydetail($temple->city_id);
$templegalleries = templegallery($temple_id);
$radius = 100;
$cond = " and id!='{$temple_id}'";
$nearbytemples = nearbytemples($temple->latitude, $temple->longitude, $radius, $cond, 0, 20);
$showimage = '';
if (trim($image) != '' && file_exists('wp-content/uploads/temples/' . $image)) {
    list($imgwidth) = getimagesize('wp-content/uploads/temples/' . $image);
    /*if($imgwidth>781){
    	$imagepath=get_option('home').'/wp-content/plugins/temple/imagecrope.php?width=781&amp;maxw=781&amp;height=330&amp;maxh=330&amp;file='.get_option('home').'/wp-content/uploads/temples/'.$image;
    	}
    	else
    	{*/
    $imagepath = get_option('home') . '/wp-content/uploads/temples/' . $image;
    //}
Пример #7
0
        ?>
</th>
            <th valign="top" align="left" style="border-left:1px solid #ccc;"><?php 
        _e("City");
        ?>
</th>
            <th valign="top" align="left" style="border-left:1px solid #ccc;"><?php 
        _e("Action");
        ?>
</th>
		</tr>
	<?php 
        $cnt = $limitstart + 1;
        foreach ($temples as $temple) {
            $stateid = $temple->state_id;
            $st = Statedetail($stateid);
            $state = $st[0]->state;
            $cityid = $temple->city_id;
            $city = Citydetail($cityid);
            $city = $city[0]->city;
            ?>
	  <tr>
		<td valign="top" align="left" style="border-top:1px solid #ccc;">&nbsp;<?php 
            _e($cnt);
            ?>
</td>
		<td valign="top" align="left" style="border-top:1px solid #ccc; border-left:1px solid #ccc;"><?php 
            _e($temple->name);
            ?>
</td>
        <td valign="top" align="left" style="border-top:1px solid #ccc; border-left:1px solid #ccc;"><?php