Beispiel #1
0
 static function add($msg, $method)
 {
     $ip = Utils::ip();
     $date = Utils::date_time_now();
     //        $row = array(
     //            "ip"       => $ip,
     //            "add_time" => $date,
     //            "msg"      => $msg,
     //            "method"   => $method,
     //            "user_id"  => Model_Admin_Auth::get_user_id(),
     //        );
     $row = array("action_ip" => Utils::ip(true), "create_time" => time(), "remark" => $msg, "model" => $method, "user_id" => Model_Admin_Auth::get_user_id());
     self::_db()->insert(self::TABLE, $row);
 }
Beispiel #2
0
 static function note_add($id, $note, $op_uid)
 {
     $table = self::TABLE_TRACE;
     $row = array("note" => $note, "ip" => Utils::ip(), "store_id" => $id, "op_uid" => $op_uid, "add_time" => Utils::date_time_now());
     return self::_db()->insert($table, $row);
 }
Beispiel #3
0
 static function note_add($id, $note, $op_uid)
 {
     $row = array("note" => $note, "ip" => Utils::ip(), "agent_id" => $id, "op_uid" => $op_uid, "add_time" => Utils::date_time_now());
     return self::_db()->insert("crm_agent_trace", $row);
 }
Beispiel #4
0
 /**
  * 创建新用户
  * @param $username
  * @param $password
  * @param $mobile
  * @param $locked
  * @param $passport_uid
  * @return array
  */
 static function create_new_user($username, $password, $mobile, $locked = 'N', $passport_uid = null)
 {
     $user_info = array("passport_uid" => $passport_uid, "balance" => 0.0, "user_type" => null, "username" => $username, "mobile" => $mobile, "locked" => $locked, "ip" => Utils::ip(true), "password" => self::gen_password($password), "password_encrypt" => self::password_encrypt($password), "addtime" => time());
     $table = self::_table("user");
     $user_id = self::_db()->insert($table, $user_info);
     $user_info['user_id'] = $user_id;
     self::set_user_info_cache($user_id, $user_info);
     return $user_info;
 }