信呼v2.5.2版本
This commit is contained in:
@@ -523,4 +523,59 @@ class uploadClassAction extends apiAction
|
||||
|
||||
return returnsuccess($uarr);
|
||||
}
|
||||
|
||||
/**
|
||||
* 文库选择文件
|
||||
*/
|
||||
public function changedataAction()
|
||||
{
|
||||
$rows = array();
|
||||
$uptp = $this->get('uptp');
|
||||
$tsye = $this->get('tsye');
|
||||
$key = $this->get('key');
|
||||
$selv = (int)$this->get('selvalue','0');
|
||||
$where = '`optid`='.$this->adminid.'';
|
||||
if($selv==1){
|
||||
$str = m('admin')->getjoinstrs('`shateid`', $this->adminid, 1);
|
||||
$where = '`id` in(select `fileid` from `[Q]word` where `type`=0 '.$str.' )';
|
||||
}
|
||||
if($key){
|
||||
$key = $this->jm->base64decode($key);
|
||||
$where.=" and `filename` like '%".$key."%'";
|
||||
}
|
||||
if($uptp && $uptp!='*'){
|
||||
if($uptp=='image')$uptp='jpg,png,gif,jpeg';
|
||||
$uptp = str_replace(',', "','", $uptp);
|
||||
$where.=" and `fileext` in('".$uptp."')";
|
||||
}
|
||||
$db = m('file');
|
||||
$rows = $db->getall($where,'id,filename,filesizecn,fileext,thumbpath,filepath,filepathout','`id` desc limit 10');
|
||||
foreach($rows as $k=>$rs){
|
||||
$rows[$k]['value'] = $rs['id'];
|
||||
$rows[$k]['name'] = $rs['filename'];
|
||||
$rows[$k]['subname']= $rs['filesizecn'];
|
||||
$rows[$k]['xuanbool']= true;
|
||||
if($tsye=='img'){
|
||||
if(!isempt($rs['filepathout']))$rows[$k]['filepath'] = $rs['filepathout'];
|
||||
}else{
|
||||
unset($rows[$k]['filepath']);
|
||||
}
|
||||
unset($rows[$k]['filepathout']);
|
||||
if(!isempt($rs['thumbpath'])){
|
||||
$rows[$k]['iconsimg'] = $rs['thumbpath'];
|
||||
}else{
|
||||
$flx = $rs['fileext'];
|
||||
if(!contain($db->fileall,','.$flx.','))$flx='wz';
|
||||
$rows[$k]['iconsimg'] = 'web/images/fileicons/'.$flx.'.gif';
|
||||
}
|
||||
}
|
||||
$count = $db->rows($where);
|
||||
$selectdata[] = array('value'=>'','name'=>'选自己上传');
|
||||
$selectdata[] = array('value'=>'1','name'=>'共享给我的');
|
||||
return array(
|
||||
'rows' => $rows,
|
||||
'totalCount' => $count,
|
||||
'selectdata' => $selectdata
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -42,72 +42,5 @@ class hrClassAction extends runtAction
|
||||
return 'success';
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//转正的
|
||||
private function updatepositive($timess)
|
||||
{
|
||||
$db = m('hrpositive');
|
||||
$rows = $db->getall("`status`=1 and `isover`=0",'`id`,`uid`,`entrydt`,`syenddt`,`positivedt`');
|
||||
foreach($rows as $k=>$rs){
|
||||
if(strtotime($rs['positivedt']) <= $timess){
|
||||
$bo = m('userinfo')->update(array(
|
||||
'state' => '1',
|
||||
'syenddt' => $rs['syenddt'],
|
||||
'positivedt' => $rs['positivedt'],
|
||||
), $rs['uid']);
|
||||
if($bo)$db->update("`isover`=1", $rs['id']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//离职的
|
||||
private function updatehrredund($timess)
|
||||
{
|
||||
$db = m('hrredund');
|
||||
$rows = $db->getall("`status`=1 and `isover`=0",'`id`,`uid`,`quitdt`');
|
||||
$timess = $timess - 24*3600;//昨天
|
||||
foreach($rows as $k=>$rs){
|
||||
if(strtotime($rs['quitdt']) <= $timess){
|
||||
$bo = m('userinfo')->update(array(
|
||||
'state' => '5',
|
||||
'quitdt' => $rs['quitdt']
|
||||
), $rs['uid']);
|
||||
m('admin')->update(array(
|
||||
'quitdt' => $rs['quitdt']
|
||||
), $rs['uid']);
|
||||
if($bo)$db->update("`isover`=1", $rs['id']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//调动的
|
||||
private function updatehrtransfer($timess)
|
||||
{
|
||||
$db = m('hrtransfer');
|
||||
$mdb = m('admin');
|
||||
$rows = $db->getall("`status`=1 and `isover`=0",'`id`,`uid`,`effectivedt`,`newdeptid`,`tranuid`,`newdeptname`,`newranking`');
|
||||
$uids = '0';
|
||||
foreach($rows as $k=>$rs){
|
||||
if(strtotime($rs['effectivedt']) <= $timess){
|
||||
$uid = $rs['tranuid'];
|
||||
$bo = $mdb->update(array(
|
||||
'deptid' => $rs['newdeptid'],
|
||||
'deptname' => $rs['newdeptname'],
|
||||
'ranking' => $rs['newranking'],
|
||||
), $uid);
|
||||
if($bo){
|
||||
$db->update("`isover`=1", $rs['id']);
|
||||
$uids.=','.$uid;
|
||||
}
|
||||
}
|
||||
}
|
||||
if($uids != '0')$mdb->updateinfo("and `id` in($uids)");
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user