function ew_get_sidebar_div($id_sidebar, $ul_class = 'xoxo', $id_area = '', $custom_class = '') { ob_start(); ?> <div <?php if ($id_area) { echo 'id="' . $id_area . '"'; } ?> class="widget-area<?php if (!$custom_class) { echo ' ' . $custom_class; } ?> " role="complementary"> <ul class="<?php echo $ul_class; ?> " id="<?php echo friendlyURL($id_sidebar); ?> "> <?php dynamic_sidebar($id_sidebar); ?> </ul> </div> <?php $output = ob_get_contents(); ob_end_clean(); return $output; }
function get_areas_array() { $area_string = get_option(THEME_SLUG . 'areas'); $result = array(); if ($area_string) { $area_array = json_decode($area_string); foreach ($area_array as $area) { $option = array(); $option['value'] = friendlyURL($area); $option['label'] = $area; $result[] = $option; } } return $result; }
/images/twit_ico.gif" /></a> <a href="http://www.linkedin.com/shareArticle?mini=true&url=<?php echo $share_link . 'deals/' . friendlyURL(html_entity_decode($row['coupon_name'], ENT_QUOTES)) . '_' . $row['coupon_id'] . '.html', $row['coupon_name']; ?> " target="_blank" > <img src="<?php echo DOCROOT; ?> themes/<?php echo CURRENT_THEME; ?> /images/in_ico.gif" /></a> <a href="mailto:?body=Checkout daily deals and huge discounts on the coolest stuff in your city<?php echo urlencode(DOCROOT . 'ref.html?id=' . 'deals/' . friendlyURL(html_entity_decode($row['coupon_name'], ENT_QUOTES)) . '_' . $row['coupon_id'] . '.html'); ?> &subject=I think you will get best deals" target="_blank" > <img src="<?php echo DOCROOT; ?> themes/<?php echo CURRENT_THEME; ?> /images/mail_ico.gif" /></a> </div> </div> <div class="share_right"> <a href="<?php echo DOCROOT;
echo DOCROOT; ?> site-admin/scripts/jquery.cleditor.js" type="text/javascript"></script> <?php session_start(); is_login(DOCROOT . "admin/login/"); //checking whether admin logged in or not. $id = $url_arr[3]; if ($_POST) { $id = $_POST['id']; $title = htmlentities($_POST['title'], ENT_QUOTES); $description = htmlentities($_POST['description'], ENT_QUOTES); $meta_keywords = htmlentities($_POST['meta_keywords'], ENT_QUOTES); $meta_description = htmlentities($_POST['meta_description'], ENT_QUOTES); $title_url = friendlyURL($title); $result = mysql_query("select * from pages where title='{$title}' and id<>{$id}"); if (mysql_num_rows($result) > 0) { set_response_mes(-1, $admin_language['pagetitleexist']); $redirect_url = DOCROOT . 'edit/page/' . $id; url_redirect($redirect_url); } mysql_query("update pages set title = '{$title}',title_url = '{$title_url}',description = '{$description}',meta_keywords = '{$meta_keywords}',meta_description = '{$meta_description}' where id='{$id}' "); set_response_mes(1, $admin_language['pageupdated']); $redirect_url = DOCROOT . 'manage/pages/'; url_redirect($redirect_url); } ?> <script type="text/javascript"> /* validation */
$cancelURL = urlencode(DOCROOT . 'orderdetails.html?paymentType=cancel'); /* Construct the parameter string that describes the PayPal payment the varialbes were set in the web form, and the resulting string is stored in $nvpstr */ $nvpstr = ""; /* * Setting up the Shipping address details */ //$shiptoAddress = "&SHIPTONAME=$personName&SHIPTOSTREET=$SHIPTOSTREET&SHIPTOCITY=$SHIPTOCITY&SHIPTOSTATE=$SHIPTOSTATE&SHIPTOCOUNTRYCODE=$SHIPTOCOUNTRYCODE&SHIPTOZIP=$SHIPTOZIP"; /*$nvpstr="&ADDRESSOVERRIDE=1$shiptoAddress&L_NAME0=".$L_NAME0."&L_NAME1=".$L_NAME1."&L_AMT0=".$L_AMT0."&L_AMT1=".$L_AMT1."&L_QTY0=".$L_QTY0."&L_QTY1=".$L_QTY1."&MAXAMT=".(string)$maxamt."&AMT=".(string)$amt."&ITEMAMT=".(string)$itemamt."&CALLBACKTIMEOUT=4&L_SHIPPINGOPTIONAMOUNT1=8.00&L_SHIPPINGOPTIONlABEL1=UPS Next Day Air&L_SHIPPINGOPTIONNAME1=UPS Air&L_SHIPPINGOPTIONISDEFAULT1=true&L_SHIPPINGOPTIONAMOUNT0=3.00&L_SHIPPINGOPTIONLABEL0=UPS Ground 7 Days&L_SHIPPINGOPTIONNAME0=Ground&L_SHIPPINGOPTIONISDEFAULT0=false&INSURANCEAMT=1.00&INSURANCEOPTIONOFFERED=true&CALLBACK=https://www.ppcallback.com/callback.pl&SHIPPINGAMT=8.00&SHIPDISCAMT=-3.00&TAXAMT=2.00&L_NUMBER0=1000&L_DESC0=Size: 8.8-oz&L_NUMBER1=10001&L_DESC1=Size: Two 24-piece boxes&L_ITEMWEIGHTVALUE1=0.5&L_ITEMWEIGHTUNIT1=lbs&ReturnUrl=".$returnURL."&CANCELURL=".$cancelURL ."&CURRENCYCODE=".$currencyCodeType."&PAYMENTACTION=".$paymentType."&CUSTOM=27";*/ require_once DOCUMENT_ROOT . "/system/plugins/common.php"; $query = "select * from coupons_coupons where coupon_id='{$COUPONID}'"; $resultset = mysql_query($query); while ($row = mysql_fetch_array($resultset)) { $DESC = friendlyURL(html_entity_decode($row['coupon_name'], ENT_QUOTES)); $total_payable_amount = $row["coupon_value"]; if (ctype_digit($total_payable_amount)) { $total_payable_amount = $total_payable_amount; } else { $total_payable_amount = number_format($total_payable_amount, 2, ',', ''); $total_payable_amount = explode(',', $total_payable_amount); $total_payable_amount = $total_payable_amount[0] . '.' . $total_payable_amount[1]; } } //check whether amount payable is valid $amt = round($total_payable_amount * $L_QTY0 - $_SESSION['deductable_ref_amt'], 2); if ($_SESSION['deductable_ref_amt'] > 0) { $amnt = round($amt / $L_QTY0, 2); $tamt = round($amnt * $L_QTY0, 2); if ($tamt != $amt) {
/** * Format links and print. */ function printLinks($files, $heading, $id = NULL) { if (empty($files)) { return; } print "<h4"; print !is_null($id) ? " id='title_" . $id : ""; print "'><span class='title_env'>All</span> " . $heading . "</h4>"; print !is_null($id) ? "<table id='" . $id . "'>" : "<table>"; foreach ($files as $file) { $fileData = stat($file); $fileComponents = explode("/", ltrim($file, "./")); // Trim leading dots and slashes. Split file path into components. $fileComponentsCount = count($fileComponents); $fileName = $fileComponents[$fileComponentsCount - 1]; print '<tr class="result" data-href="#' . friendlyURL($file) . '">'; print '<td>' . $fileName . '</td>'; print '<td>' . date('Y-m-d H:i:s', $fileData['mtime']) . '</td>'; print '<td>'; foreach ($fileComponents as $i => $fileComponent) { // Don't print last three components: file env, results/screenshots, file name; if ($i < $fileComponentsCount - 3) { print '<span class="tag tag-' . $fileComponent . '">' . $fileComponent . '</span>'; } } print '</td>'; print '</tr>'; } print '</table>'; }
$str = str_replace("COUPONNAME", ucfirst(html_entity_decode($row["coupon_name"], ENT_QUOTES)), $str); $str = str_replace("COUPONIMAGESRC", $img_url, $str); $str = str_replace("CURRENTAMOUNT", CURRENCY . round($current_amount), $str); $str = str_replace("COUPONREALVALUE", CURRENCY . $row["coupon_realvalue"], $str); $str = str_replace("COUPONOFFER", round($coupon_offer) . '%', $str); $str = str_replace("DISCOUNT", CURRENCY . $discount, $str); $str = str_replace("SHOPADDRESS", html_entity_decode($row["shop_address"], ENT_QUOTES), $str); $str = str_replace("CITYNAME", $cityname, $str); $str = str_replace("COUNTRYNAME", html_entity_decode($row["countryname"], ENT_QUOTES), $str); $str = str_replace("COUPONDESCRIPTION", nl2br(html_entity_decode($row["coupon_description"], ENT_QUOTES)), $str); $str = str_replace("CONTACTURL", $contact_url, $str); $str = str_replace("DEALURL", $deal_url, $str); $str = str_replace("SITENAME", SITE_NAME, $str); //get the purchased coupon's count $purchased_count = $row["pcounts"]; $deal_url = DOCROOT . 'deals/' . friendlyURL(html_entity_decode($row["coupon_name"], ENT_QUOTES)) . '_' . $row['coupon_id'] . '.html'; } /* Select the Email to that purticular city Details*/ //echo "select * from newsletter_subscribers where city_id='$cityid' and status='A'"; $resultSet_Email = mysql_query("select * from newsletter_subscribers where city_id='{$cityid}' and status='A'"); if (mysql_num_rows($resultSet_Email) > 0) { while ($row_Email = mysql_fetch_array($resultSet_Email)) { if ($row_Email['email'] != '') { $email_list .= $row_Email['email'] . ','; } } $to1 = $email_list; $to = substr($to1, 0, strlen($to1) - 1); $subject = "Deals of the Day"; $from = SITE_EMAIL; // To send HTML mail, the Content-type header must be set
if ($_POST["submit_comment"] == $language['post']) { $message = $_POST["comment_text"]; $message = htmlentities(strip_tags($message), ENT_QUOTES); $deal_id = htmlentities(strip_tags($_POST["deal_id"]), ENT_QUOTES); $userid = $_SESSION["userid"]; if ($message) { $insert_query = mysql_query("insert into discussion(user_id,deal_id,discussion_text) values('{$userid}','{$deal_id}','{$message}')"); } $get_deal_name = mysql_query("select coupon_id,coupon_name from coupons_coupons where coupon_id = '{$deal_id}' "); while ($d_val = mysql_fetch_array($get_deal_name)) { if ($insert_query) { set_response_mes(1, $language['discussion_posted']); url_redirect(DOCROOT . "deals/" . friendlyURL($d_val["coupon_name"]) . "_" . $d_val["coupon_id"] . ".html"); } else { set_response_mes(-1, $language['enter_discussion_message']); url_redirect(DOCROOT . "deals/" . friendlyURL($d_val["coupon_name"]) . "_" . $d_val["coupon_id"] . ".html"); } } } ?> <!-- Write a Review --> <?php $cur_url = explode('/', $_SERVER['REQUEST_URI']); if ($cur_url[2] != 'past') { ?> <div class="reviews_box" style="margin-left:5px;"> <?php if ($_SESSION["userid"]) { ?>
<?php is_login(DOCROOT . "admin/login/"); //checking whether admin logged in or not. $xml_content = '<?xml version="1.0" encoding="UTF-8"?> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">'; $queryString = "select coupon_id,coupon_name,coupon_description,coupon_startdate,coupon_enddate,coupon_image,coupon_realvalue from coupons_coupons where coupon_status = 'A' AND coupon_enddate > now() order by coupon_id desc"; $result = mysql_query($queryString); while ($row = mysql_fetch_array($result)) { $xml_content .= "\t\n\t\t\t\t<url>\n\t\t\t\t <loc>" . DOCROOT . "deals/" . friendlyURL(html_entity_decode($row["coupon_name"])) . "_" . $row["coupon_id"] . ".html</loc>\n\t\t\t\t <priority>0.5</priority>\n\t\t\t\t <changefreq>daily</changefreq>\n\t\t </url>"; } //add the category url $queryString = "select * from coupons_category where status='A' order by category_name asc"; $result = mysql_query($queryString); while ($row = mysql_fetch_array($result)) { $xml_content .= "\t\n\t\t\t\t<url>\n\t\t\t\t <loc>" . DOCROOT . "deals/category/" . html_entity_decode($row["category_url"]) . ".html</loc>\n\t\t\t\t <priority>0.5</priority>\n\t\t\t\t <changefreq>daily</changefreq>\n\t\t </url>"; } $xml_content .= "</urlset>"; $filename = DOCUMENT_ROOT . '/sitemap.xml'; $somecontent = $xml_content; // Let's make sure the file exists and is writable first. if (is_writable($filename)) { // In our example we're opening $filename in append mode. // The file pointer is at the bottom of the file hence // that's where $somecontent will go when we fwrite() it. if (!($handle = fopen($filename, 'w'))) { echo "Cannot open file ({$filename})"; exit; } // Write $somecontent to our opened file. if (fwrite($handle, $somecontent) === FALSE) {
$meta_title = $row[0]['meta_title']; $meta_keyword = $row[0]['meta_keyword']; $meta_description = $row[0]['meta_description']; //$arrDisplayPagesValues= $objpage->getDisplayValue($id); } if (isset($_POST['submit']) && $_POST['submit'] != "") { extract($_POST); foreach ($_POST as $k => $v) { if ($k == 'submit' || $k == 'display_in') { continue; } //if($v)){ $arFieldValues[$k] = $v; //} } $search_name = friendlyURL($title); //$arFieldValues['search_name'] = $search_name; if (empty($title)) { $arrError[] = 'Page Title can not be empty'; } elseif ($objpage->checkPageId($title, $id)) { $arrError[] = 'Page Alread Exists'; } else { if (!$id) { $db->insert($table, $arFieldValues); ob_end_clean(); header("Location: pages.php"); exit; } else { foreach ($arFieldValues as $k => $v) { if ($k == 'id') { continue;
} $resultSet = mysql_query($queryString); if (mysql_num_rows($resultSet) > 0) { if ($_REQUEST["type"] == n) { echo ' <label for="dummy1">Location</label><br> <select name="city" id="city"><option value="-2"> - Choose - </option>'; } else { echo ' <label for="dummy1">Location</label><br> <select name="city" id="city" onchange="loadcityshop(this.value)"><option value="-2"> - Choose - </option>'; } while ($noticia = mysql_fetch_array($resultSet)) { echo '<option value="' . $noticia["cityid"] . '">' . html_entity_decode($noticia["cityname"], ENT_QUOTES) . '</option>'; } if ($_REQUEST["type"] == n) { echo '</select> <font style="float:left; color:#ff9f00; font-size:11px;">(Optional)</font></p>'; } else { echo '</select><br> <span id="cityshopdetails"> </span> </p>'; } } } else { if ($_REQUEST["permalink"]) { echo friendlyURL($_REQUEST["permalink"]); } } } } } } } } } } ob_flush();