コード例 #1
0
 public function digestCookieData()
 {
     global $whmcs;
     $sortdata = WHMCS_Cookie::get("SD", true);
     $name = $this->name;
     if (array_key_exists($name, $sortdata)) {
         $orderby = $sortdata[$name]['orderby'];
         if ($orderby) {
             $this->setOrderBy($orderby);
         }
         $orderbysort = $sortdata[$name]['sort'];
         if ($orderbysort) {
             $this->setSortDirection($orderbysort);
         }
     }
     if ($orderby = $whmcs->get_req_var("orderby")) {
         $this->setOrderBy($orderby);
         $sortdata[$name] = array("orderby" => $this->orderby, "sort" => $this->sort);
         WHMCS_Cookie::set("SD", $sortdata);
         redir("filter=1");
     }
     if ($page = $whmcs->get_req_var("page")) {
         $this->setPage($page);
     }
     $this->setRecordLimit($whmcs->get_config("NumRecordstoDisplay"));
 }
コード例 #2
0
ファイル: class.filter.php プロジェクト: billyprice1/whmcs
 public function store()
 {
     if ($this->getFromReq("filter")) {
         return false;
     }
     $arr = array();
     foreach ($this->allowedvars as $op) {
         $arr[$op] = $this->getFromReq($op);
     }
     $this->data[$this->name] = $arr;
     WHMCS_Cookie::set("FD", $this->data);
     return true;
 }
コード例 #3
0
function affcoupons_set_affiliate_cookie($vars)
{
    if (isset($vars['promo'])) {
        $promocode = $vars['promo'];
        $data = select_query('tblpromotions', 'id', array("code" => "{$promocode}"));
        if (mysql_num_rows($data)) {
            $row = mysql_fetch_array($data);
            $couponid = $row[0];
            $pdata = select_query('tblaffcoupons', 'aff_id', array("coupon" => $couponid));
            if (mysql_num_rows($pdata)) {
                $prow = mysql_fetch_array($pdata);
                $affid = $prow[0];
                $checkcookie = WHMCS_Cookie::get("AffiliateID", true);
                if ($affid) {
                    // update_query("tblaffiliates",array("visitors"=>"+1"),array("id"=>$affid));
                    WHMCS_Cookie::set('AffiliateID', $affid, '3m');
                }
            }
        }
    }
}
コード例 #4
0
ファイル: class.auth.php プロジェクト: billyprice1/whmcs
 public function unsetRememberMeCookie()
 {
     WHMCS_Cookie::delete("AU");
 }
コード例 #5
0
ファイル: aff.php プロジェクト: carriercomm/whmcs-5
/**
 * Affiliate Cookie Tracking + Redirection Handler
 *
 * @package    WHMCS
 * @author     WHMCS Limited <*****@*****.**>
 * @copyright  Copyright (c) WHMCS Limited 2005-2013
 * @license    http://www.whmcs.com/license/ WHMCS Eula
 * @version    $Id$
 * @link       http://www.whmcs.com/
 */
define("CLIENTAREA", true);
require "init.php";
// if affiliate id is present, update visitor count & set cookie
if ($aff = $whmcs->get_req_var('aff')) {
    update_query("tblaffiliates", array("visitors" => "+1"), array("id" => $aff));
    WHMCS_Cookie::set('AffiliateID', $aff, '3m');
}
// if product id passed in, redirect to order form
if ($pid = $whmcs->get_req_var('pid')) {
    redir("a=add&pid=" . (int) $pid, "cart.php");
}
// if product group id passed in, redirect to product group
if ($gid = $whmcs->get_req_var('gid')) {
    redir("gid=" . (int) $gid, "cart.php");
}
// if register = true, redirect to registration form
if ($whmcs->get_req_var('register')) {
    redir("", "register.php");
}
// if gocart = true, redirect to cart with request params
if ($whmcs->get_req_var('gocart')) {
コード例 #6
0
ファイル: functions.php プロジェクト: billyprice1/whmcs
 function wDelCookie($name)
 {
     return WHMCS_Cookie::delete($name);
 }
コード例 #7
0
ファイル: link.php プロジェクト: billyprice1/whmcs
<?php

/**
 *
 * @ WHMCS FULL DECODED & NULLED
 *
 * @ Version  : 5.2.15
 * @ Author   : MTIMER
 * @ Release on : 2013-12-24
 * @ Website  : http://www.mtimer.cn
 *
 **/
require "init.php";
$id = (int) $whmcs->get_req_var("id");
$url = get_query_val("tbllinks", "link", array("id" => $id));
if ($url) {
    update_query("tbllinks", array("clicks" => "+1"), array("id" => $id));
    WHMCS_Cookie::set("LinkID", $id, "3m");
    run_hook("LinkTracker", array("linkid" => $id));
    header("Location: " . $url);
    exit;
    return 1;
}
redir("", "index.php");