/** * get site's stat code * @return Str javaScript code */ public function statking_code() { $data = $this->data['statking_code']; return Mytool::js_decode($data); }
/** * $UseSSL = 0; //Set to 1 to use SSL to connect to enom - use 0 for none * $Server = 1; // 1 for testing, 0 forlive (case sensative); */ public function DoTransaction($Server = 1, $UseSSL = 1) { $Values = ""; if ($Server == '1') { $host = 'resellertest.enom.com'; } elseif ($Server == '0') { $host = 'reseller.enom.com'; } else { $host = 'resellertest.enom.com'; } if ($UseSSL == 1) { $url = "https://" . $host; } else { $url = "http://" . $host; } // Send command with our parameters $out = Mytool::curl_post($url . '/interface.asp', $this->PostString); $this->ParseResponse($out); }
public function encrypt_regmail_key($uid, $email) { $mail_check_pwd = Kohana::config('site_config.site.register_mail_check_pwd'); $key = Mytool::hash(Mytool::hash(Mytool::hash($mail_check_pwd) . $email) . $uid); return $key; }
/** * user register * * @param Array register data * @return Int user id */ public function register($data) { $user = ORM::factory('user'); $data['password'] = Mytool::hash($data['password']); if ($user->validate($data, FALSE)) { $user->save(); return $user->id; } else { return FALSE; } }