chengkun
2025-05-23 a6f7b382623096b6a00924f418447cf5204e825e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<?php
 
 
 
class info_controller extends user
{
    //基本信息
    function index_action(){
        
        $nametype    =    array('1'=>'完全公开','2'=>'显示编号','3'=>'性别称呼');
        
        $this -> yunset("nametype",$nametype);
        
        $this -> public_action();
        
        $this -> yunset($this->MODEL('cache')->GetCache(array('user','city')));
        
        $this -> user_tpl('info');
    }
 
    //保存基本信息
    function save_action(){
 
        $resumeM      =      $this -> MODEL('resume'); 
 
        $resume     =     $resumeM->getResumeInfo(array('uid'=>$this->uid));
 
        $mData        =    array(
            
            'moblie'        =>    $_POST['telphone'],
            'email'            =>    $_POST['email']
        );
 
        $rData    =    array(
            'name'            =>    $_POST['name'],
            'nametype'        =>    $_POST['nametype'],
            'sex'            =>    $_POST['sex'],
            'birthday'        =>    $_POST['birthday'],
            'edu'            =>    $_POST['edu'],
            'exp'            =>    $_POST['exp'],
            'telphone'        =>    $_POST['telphone'],
            'living'        =>    $_POST['living'],
            'email'            =>    $_POST['email'],
            'address'        =>    $_POST['address'],
            'height'        =>    $_POST['height'],
            'weight'        =>    $_POST['weight'],
            'nationality'    =>    $_POST['nationality'],
            'marriage'        =>    $_POST['marriage'],
            'domicile'        =>    $_POST['domicile'],
            'qq'            =>    $_POST['qq'],
            'homepage'        =>    $_POST['homepage'],
            'lastupdate'    =>    time()
        );
 
        if(!$resume['photo'] || ($resume['defphoto']==2 && $rData['sex']!=$resume['sex'])){
 
            $logo   =   $resumeM->deflogo($rData);
 
            if($logo!=''){
 
                $rData['photo']         = $logo;
                $rData['defphoto']         = 2;
                $rData['photo_status']     = 1;
            }
        }
 
        if($this->config['user_revise_state'] == 0){
 
            $rData['state'] =   0;
        }
 
        $return =   $resumeM->upResumeInfo(array('uid' => $this->uid), array('mData' => $mData, 'rData' => $rData, 'utype' => 'user', 'port' => 1));
        
        $this->ACT_layer_msg($return['msg'],$return['errcode'],$return['url'],2,1);
    }
 
    //头像公开关闭设置
    function phototype_action()
    {
 
        $ResumeM    =   $this->MODEL('resume');
 
        $ResumeM->upResumeInfo(array('uid' => $this->uid), array('rData' => array('phototype' => intval($_POST['phototype']))));
        $ResumeM->upInfo(array('uid' => $this->uid), array('eData' => array('phototype' => intval($_POST['phototype']))));
 
        echo $_POST['phototype'];
        die();
    }
}
?>