Title / Description
Code function init () { global $REMOTE_ADDR, $site_own, $eng, $DEBUG, $HTTP_X_FORWARDED_FOR, $HTTP_COOKIE_VARS ; $this->id = null ; $this->data = null ; $this->stamp = null ; $this->errors = array(); if(isset($HTTP_COOKIE_VARS[$site_own."-users"])) { $this->stamp = $HTTP_COOKIE_VARS[$site_own."-users"]; $sql = " select * from {$site_own}.users_stamp where stamp = '{$this->stamp}' "; if(DEBUG) error_log($sql); $user_id_data = array(); $n_user_id_data = eng_query($sql,$user_id_data); if($n_user_id_data == 1) { $this->id = $user_id_data["ID"][0]; $options = array ( NO_DATE_DEPTH => true, OBJECTS => "USERS" , WHERE => sprintf ( "id=%d", $this->id ), ORDER => "status" ) ; $dummy = 0 ; $n_user_data = get_obj_simple_list ( $options, $this->data, $dummy ) ; if ($n_user_data == 1) { $ok = true; $this->set_attrs () ; return true; } else { $this->id = 0; return false; } } else { $this->id = 0; return false; } } else { $this->id = 0; return false; } }
Author
Highlight as C C++ CSS Clojure Delphi ERb Groovy (beta) HAML HTML JSON Java JavaScript PHP Plain text Python Ruby SQL XML YAML diff code