if (isset($_SESSION['shoopin_cart'])) { $order_total = $price; $order_subtotal = $price; $order_shipping = 0; $order_tax = 0; $coupon_discount = 0; $coupon_code = ''; $order_discount = 0; $usermessage = $_SESSION['shoopin_cart']['usermessage']; $ip = getRealIpAddr(); $sql = "INSERT INTO `" . $prefix . "orders` (`user_id`,`order_total`,`order_subtotal`,`order_tax`,`order_shipping`,`coupon_discount`, `coupon_code`,`order_discount`, `order_currency`, `order_status`, `cdate`, `mdate`, `ip_address`, `gateway_name`, `usermessage`) VALUES ('{$user_id}', '{$order_total}', '{$order_subtotal}', '{$order_tax}', '{$order_shipping}', '{$coupon_discount}','{$coupon_code}', '{$order_discount}', '{$currency}', 'P', now(), now(), '{$ip}', '{$gateway_name}','{$usermessage}')"; $result = $wpdb->query($sql); $order_id = $wpdb->insert_id; $cnt = 1; for ($i = 0; $i < count($_SESSION['shoopin_cart']['temple_id']); $i++) { $temple = templedetail($_SESSION['shoopin_cart']['temple_id'][$i]); $package = packagedetail($_SESSION['shoopin_cart']['package_id'][$i]); $package_date = $_SESSION['shoopin_cart']['poojadate'][$i]; $product_item_price = $_SESSION['shoopin_cart']['price'][$i]; $temple_id = $_SESSION['shoopin_cart']['temple_id'][$i]; $product_quantity = 1; $product_final_price = $_SESSION['shoopin_cart']['price'][$i] * $product_quantity; $order_item_name = $temple[0]->name . ' (' . $package[0]->title . ')'; $package_name = $package[0]->title; $temple_name = $temple[0]->name; $package_type_id = $package[0]->package_type_id; $package_id = $package[0]->id; $packagetypes = packagetypedetail($package_type_id); $package_type_name = $packagetypes[0]->package_type; $commission2 = $product_quantity * $patr->marketer_commission; $commission3 = $product_quantity * $patr->bc_commission;
function category_temples($category_id) { global $wpdb; $prefix = $wpdb->base_prefix; $totalrec = 10; if (isset($_REQUEST['pagedid']) && $_REQUEST['pagedid'] > 1) { $pageid = $_REQUEST['pagedid']; $limitstart = $totalrec * ($pageid - 1); } else { $pageid = 1; $limitstart = 0; $limitsend = $totalrec; } if (trim($category_id) != '') { $cnd = " and category_id='{$category_id}' order by id desc"; } else { $cnd = " and category_id>0 order by id desc"; } $data = ''; $temples = templedetail('', $cnd . " limit {$limitstart}, {$totalrec}"); $querystr = "SELECT count(*) as total FROM " . $prefix . "temple_temples where id!='' {$cnd}"; $total = $wpdb->get_results($querystr, OBJECT); if (count($temples) > 0) { foreach ($temples as $temple) { $image = $temple->image; $data .= '<div class="mid_temple_box god_temples">'; if (trim($image) != '' && file_exists('wp-content/uploads/temples/thumb/' . $image)) { $imagepath = get_option('home') . '/wp-content/uploads/temples/thumb/' . $image; $data .= '<div class="tpl_img"> <a href="' . get_permalink($temple->post_id) . '" title="' . $temple->name . '"><img src="' . $imagepath . '" width="194" alt="' . $temple->name . '" /></a> </div>'; } $data .= '<div class="tpl_cnt_box"> <h2><a href="' . get_permalink($temple->post_id) . '" title="' . $temple->name . '">' . $temple->name . '</a></h2> <h3>' . date('F d.Y', strtotime($temple->add_date)) . '</h3> <p>' . $temple->general_info . '</p> <a href="' . get_permalink($temple->post_id) . '" title="' . $temple->name . '">More...</a> </div> </div>'; } if ($total[0]->total > count($temples)) { $url = get_permalink() . '?cid=' . $category_id . '&pagedid='; $data .= pagination($totalrec, $pageid, $url, $total[0]->total); } } return $data; }
<?php global $wpdb, $signature; $prefix = $wpdb->base_prefix; $error = array(); $id = $_REQUEST['id']; $temple_id = $id; $temple = templedetail($temple_id); $state_id = $temple[0]->state_id; $star_id = $temple[0]->star_id; $category_id = $temple[0]->category_id; $city_id = $temple[0]->city_id; $district_id = $temple[0]->district_id; $name = $temple[0]->name; $image = $temple[0]->image; $inthetemple = $temple[0]->inthetemple; $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);
<?php global $wpdb, $signature; $prefix = $wpdb->base_prefix; $error = array(); $id = $_REQUEST['id']; $tempsgod = TempGodDetail($id); $temple_id = $tempsgod[0]->temple_id; $tempsgod = templedetail($temple_id); $temple = $tempsgod[0]->temple; $tempsgod = TempGodDetail($id); $god_id = $tempsgod[0]->god_id; $tempsgod = goddetail($god_id); $god = $tempsgod[0]->god; $querystr = "SELECT * FROM " . $prefix . "temple_god"; $gods = $wpdb->get_results($querystr, OBJECT); if (isset($_POST['registration'])) { $god_id = $_POST['god_id']; if (trim($god_id) == '') { $god_id = 0; } if (count($error) <= 0) { $sql = "UPDATE `" . $prefix . "temple_templesgod` set god_id='{$god_id}' where id='{$id}'"; $result = $wpdb->query($sql); $url = get_option('home') . '/wp-admin/admin.php?page=ManageTemplesGod&update=succ'; echo "<script>window.location='" . $url . "'</script>"; } } ?> <style type="text/css"> .error
?> </th> <th valign="top" align="left" style="border-left:1px solid #ccc;"><?php _e("God"); ?> </th> <th valign="top" align="left" style="border-left:1px solid #ccc;"><?php _e("Actions"); ?> </th> </tr> <?php $cnt = $limitstart + 1; foreach ($templesgod as $tempsgod) { $templeid = $tempsgod->temple_id; $temple = templedetail($templeid); $temple_name = $temple[0]->temple; $godid = $tempsgod->god_id; $god = goddetail($godid); $god_name = $god[0]->god; ?> <tr> <td valign="top" align="left" style="border-top:1px solid #ccc;"> <?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
<?php global $wpdb, $signature; $prefix = $wpdb->base_prefix; $id = $_REQUEST['id']; $temple = templedetail($id); $post_id = $temple[0]->post_id; $image = $temple[0]->image; if (trim($image) != '' && file_exists('../wp-content/uploads/temples/' . $image)) { unlink('../wp-content/uploads/temples/' . $image); } if (trim($image) != '' && file_exists('../wp-content/uploads/temples/thumb/' . $image)) { unlink('../wp-content/uploads/temples/thumb/' . $image); } $result = $wpdb->query("DELETE FROM `" . $prefix . "posts` where ID='{$post_id}'"); $result = $wpdb->query("DELETE FROM `" . $prefix . "temple_temples` where id='{$id}'"); $result = $wpdb->query("DELETE FROM `" . $prefix . "temple_templesgod` where temple_id='{$id}'"); $result = $wpdb->query("DELETE FROM `" . $prefix . "temple_package_price` where temple_id='{$id}'"); $result = $wpdb->query("DELETE FROM `" . $prefix . "temple_options` where temple_id='{$id}'"); $url = get_option('home') . '/wp-admin/admin.php?page=Temples&del=succ'; echo "<script>window.location='" . $url . "'</script>";
<!-- HEADER--> <?php @session_start(); global $post; //print_r($post); get_header(); $post_id = $post->ID; $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);