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")); }
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'); } } } } }
public function getRememberMeCookie() { $remcookie = WHMCS_Cookie::get("AU"); if (!$remcookie) { $remcookie = WHMCS_Cookie::get("AUser"); } return $remcookie; }
function wGetCookie($name, $treatAsArray = false) { return WHMCS_Cookie::get($name, $treatAsArray); }
public function __construct() { $filtername = $this->getFilename(); $this->name = $filtername; $this->data = WHMCS_Cookie::get("FD", true); }