function arprice_Shortcode($atts) { global $wpdb, $arprice_analytics; if (!extension_loaded('geoip')) { include PRICINGTABLE_INC_DIR . '/geoip.inc'; } extract(shortcode_atts(array('id' => '1'), $atts)); $table_id = $atts['id']; if ($table_id == "") { $table_id = 1; } $result = $wpdb->get_row($wpdb->prepare("select * from " . $wpdb->prefix . "arp_arprice where ID=%d", $table_id)); $pricetable_name = $result->table_name; if ($pricetable_name == "") { return "Please Select Valid Pricing Table"; } else { if ($result->status != 'published') { return "Please Select Valid Pricing Table"; } } $file_url = PRICINGTABLE_INC_DIR . "/GeoIP.dat"; if (!extension_loaded('geoip')) { $gi = geoip_open($file_url, GEOIP_STANDARD); $country_name = geoip_country_name_by_addr($gi, $_SERVER['REMOTE_ADDR']); } else { $country_name = ""; } $d = date("Y/m/d H:i:s"); $brow = $_SERVER['HTTP_USER_AGENT']; $pageurl = $_SERVER['REQUEST_URI']; $ref = $_SERVER['HTTP_REFERER']; $ip = $_SERVER['REMOTE_ADDR']; $ses_id = session_id(); $browser = $arprice_analytics->getBrowser($brow); $sel = $wpdb->get_row($wpdb->prepare("SELECT tracking_id, session_id FROM " . $wpdb->prefix . "arp_arprice_analytics WHERE pricing_table_id = " . $table_id . " AND session_id = %s", $ses_id)); if ($sel) { require_once PRICINGTABLE_DIR . '/core/views/arprice_front.php'; $contents = arp_get_pricing_table_string($table_id); $contents = apply_filters('arp_predisplay_pricingtable', $contents, $table_id); return $contents; } $res = $wpdb->query($wpdb->prepare("INSERT INTO " . $wpdb->prefix . "arp_arprice_analytics (pricing_table_id,browser_info,browser_name,browser_version,page_url,referer,ip_address,country_name,session_id,added_date ) VALUES (%d,%s,%s,%s,%s,%s,%s,%s,%s,%s)", $table_id, $brow, $browser['browser_name'], $browser['version'], $pageurl, $ref, $ip, $country_name, $ses_id, $d)); require_once PRICINGTABLE_DIR . '/core/views/arprice_front.php'; $contents = arp_get_pricing_table_string($table_id); $contents = apply_filters('arp_predisplay_pricingtable', $contents, $table_id); return $contents; }
echo "@media screen and (min-width:" . ($mobile_size + 1) . "px) and (max-width:" . $tablet_size . "px){\n\t.arp_body_content\n\t{\n\t\tpadding: 20px 15px 20px 15px; \t\n\t}\n}"; ?> /*@media screen and (min-width:481px) and (max-width:768px){ .arp_body_content { padding:40px 15px; } } */ </style> </head> <body class="arp_body_content"> <?php require_once PRICINGTABLE_DIR . '/core/views/arprice_front.php'; $contents = arp_get_pricing_table_string($table_id, @$pricetable_name, 1); $contents = apply_filters('arp_predisplay_pricingtable', $contents, $table_id); echo $contents; ?> <script type="text/javascript" language="javascript" src="<?php echo PRICINGTABLE_URL . '/js/jquery.tooltipster.js'; ?> "></script> <link rel="stylesheet" type="text/css" href="<?php echo PRICINGTABLE_URL . '/css/tooltipster.css'; ?> " /> <?php if (@$opts) { $googlemap = 0; if ($opts['columns']) {