当前位置: 首页>>代码示例>>PHP>>正文


PHP transTime函数代码示例

本文整理汇总了PHP中transTime函数的典型用法代码示例。如果您正苦于以下问题:PHP transTime函数的具体用法?PHP transTime怎么用?PHP transTime使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了transTime函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: seeProcessDetail


//.........这里部分代码省略.........
                                     $list[$k]['dotype'] = $v2['dotype'];
                                     // 处理状态
                                     $list[$k]['douser'][] = $douser;
                                     // 处理人
                                     $list[$k]['doinfo'][] = $v2['doinfo'];
                                     // 处理意见
                                 } else {
                                     if (abs($v['tid']) == $v2['dotype'] && $v['tid'] < 0) {
                                         $list[$k]['show'] = 1;
                                         // 是否显示
                                         $list[$k]['dotime'] = $v2['dotime'];
                                         // 处理时间
                                         $list[$k]['dotype'] = $v2['dotype'];
                                         // 处理状态
                                         $list[$k]['douser'][] = $douser;
                                         // 处理人
                                         $list[$k]['doinfo'][] = $v2['doinfo'];
                                         // 处理意见
                                     }
                                 }
                             }
                         }
                     } else {
                         // 添加流程记录信息
                         foreach ($judge as $k2 => $v2) {
                             $douser = $usermodel->where('id=' . $v2['userid'])->getField('name');
                             // 判断当前节点等于流程明细的审核节点
                             if ($v['tid'] == $v2['ostatus'] && $v['tid'] > 0) {
                                 $list[$k]['show'] = 1;
                                 // 是否显示
                                 $list[$k]['dotime'] = $v2['dotime'];
                                 // 处理时间
                                 $list[$k]['dotype'] = $v2['dotype'];
                                 // 处理状态
                                 $list[$k]['douser'][] = $douser;
                                 // 处理人
                                 $list[$k]['doinfo'][] = $v2['doinfo'];
                                 // 处理意见
                             } else {
                                 if (abs($v['tid']) == $v2['dotype'] && $v['tid'] < 0) {
                                     $list[$k]['show'] = 1;
                                     // 是否显示
                                     $list[$k]['dotime'] = $v2['dotime'];
                                     // 处理时间
                                     $list[$k]['dotype'] = $v2['dotype'];
                                     // 处理状态
                                     $list[$k]['douser'][] = $douser;
                                     // 处理人
                                     $list[$k]['doinfo'][] = $v2['doinfo'];
                                     // 处理意见
                                 }
                             }
                         }
                     }
                 }
             }
         }
     }
     // 构造节点处理等待时间
     foreach ($list as $k => $v) {
         // 判断处理时间是否存在
         if ($list[$k]['dotime']) {
             $next = $k + 1;
             // 取到下个审核节点
             // 判断下个节点是否小于所有节点之和
             if ($next < count($list)) {
                 $nexttime = $list[$next]['dotime'];
                 // 下个节点处理时间
                 // 判断下个节点时间是否存在
                 if (!$nexttime) {
                     $nexttime = time();
                     // 等于当前时间
                 }
                 // 下个节点时间减去当前节点时间获取小时数
                 $hours = number_format(($nexttime - $list[$k]['dotime']) / 3600);
                 // 判断小时数是否大于一天
                 if ($hours > 24) {
                     // 大于一天的 用填进行计算
                     $list[$k]['days'] = round(number_format($hours) / 24) . '天';
                 } else {
                     $list[$k]['days'] = number_format($hours) . '小时';
                 }
             } else {
                 $list[$k]['days'] = $list[$k - 1]['days'];
             }
             $list[$k]['dotime'] = transTime($v['dotime']);
         } else {
             $list[$k]['days'] = "&nbsp;";
         }
     }
     $this->assign('list', $list);
     $orderno = "";
     if ($ptmp['orderno']) {
         $orderno = $ptmp['orderno'];
     } else {
         $orderno = $ptmp['code'];
     }
     $this->assign('orderno', $orderno);
     $this->display('Public:process');
 }
开发者ID:tmlsoft,项目名称:main,代码行数:101,代码来源:CommonAuditAction.class.php

示例2: lookupGetdate

 public function lookupGetdate()
 {
     $name = 'MisWorkPlanContent';
     $model = M('mis_work_plan_content');
     $map = array();
     $map['status'] = 1;
     if ($_SESSION["a"] != 1) {
         $map['userid'] = $_SESSION[C('USER_AUTH_KEY')];
     }
     if ($_REQUEST['createid']) {
         $map['createid'] = $_REQUEST['createid'];
     }
     $starttime = strtotime($_REQUEST['starttime']);
     $endtime = strtotime($_REQUEST['endtime']);
     $map['createtime'] = array("exp", ">=" . $starttime . " and createtime <" . $endtime);
     $list = $model->where($map)->field('id,createtime')->select();
     $arr = array();
     $aaa = array();
     foreach ($list as $key => $value) {
         $daytime = date("Y-m-d", $value['createtime']);
         $daytime = strtotime($daytime);
         if (!in_array($daytime, $aaa)) {
             $start = transTime($value['createtime'], 'Y-m-d H:i:s');
             $end = transTime($value['createtime'] + 1, 'Y-m-d H:i:s');
             $arr[] = array('id' => $value['id'], 'title' => "", 'start' => $start, 'end' => $end, 'tdclassName' => 'pred');
             array_push($aaa, $daytime);
         }
     }
     echo json_encode($arr);
 }
开发者ID:tmlsoft,项目名称:main,代码行数:30,代码来源:MisWorkPlanContentAction.class.php

示例3: getNoticeDetail

 /**
  * @Title: getNoticeDetail
  * @Description: todo(获得系统公告详细信息,返回的是json)
  * @param unknown_type $id  公告id
  * @author xiafengqin
  * @date 2014-4-3 下午3:45:52
  * @throws
  */
 public function getNoticeDetail()
 {
     //获取系统公告ID
     $id = $_REQUEST['id'];
     //判断当前用户是否已查看 未查看则添加记录
     $mSAUmodel = M("mis_system_announcement_user");
     $readStatus = $mSAUmodel->where("userid=" . $this->userid . " and announceid=" . $id)->getField("status");
     $readData = array();
     $readData['userid'] = $this->userid;
     $readData['announceid'] = $id;
     $readData['status'] = 1;
     if ($readStatus == NULL) {
         //新增
         $mSAUmodel->data($readData)->add();
     } else {
         if ($readStatus == 0) {
             //状态为未读时
             $mSAUmodel->where("userid=" . $this->userid . " and announceid=" . $_REQUEST['id'])->setField('status', 1);
         }
     }
     $MisSystemAnnouncementModel = D('MisSystemAnnouncement');
     $map = array();
     $map['status'] = 1;
     $map['commit'] = 1;
     $map['id'] = $id;
     $returnData = $MisSystemAnnouncementModel->where($map)->field('id,title,createid,createtime,content')->find();
     if ($returnData) {
         //声明相关附件表
         $modelMAR = M('MisAttachedRecord');
         //获取附件信息
         $num = 0;
         $map = array();
         $map["status"] = 1;
         $map["orderid"] = $returnData['id'];
         $map["type"] = 78;
         $attarry = $modelMAR->field("upname,attached")->where($map)->select();
         if ($attarry) {
             $returnData['attach'] = array();
             foreach ($attarry as $attkey => $attval) {
                 $returnData['attach'][$num]['attachname'] = $attval['upname'];
                 //注意这里的路径,必须是__APP__."/MisSystemAnnouncement/misFileManageDownload/:对应模型名称,不能是__URL__."/misFileManageDownload/;将取不到数据
                 $returnData['attach'][$num]['attachurl'] = __APP__ . "/MisSystemAnnouncement/misFileManageDownload/path/" . base64_encode($attval['attached']) . "/rename/" . $attval['upname'];
                 $num++;
             }
         } else {
             //你存在数据是赋予空值
             $returnData['attach'] = null;
         }
     }
     //将id转化成人名,将时间戳转换成日期格式,将部门取出
     $returnData['username'] = getFieldBy($returnData['createid'], 'id', 'name', 'user');
     $deptid = getFieldBy($returnData['createid'], 'id', 'dept_id', 'user');
     $returnData['deptname'] = getFieldBy($deptid, 'id', 'name', 'mis_system_department');
     $returnData['createtime'] = transTime($returnData['createtime']);
     $returnData['content'] = strip_tags($returnData['content']);
     unset($returnData['createid']);
     if ($returnData) {
         //echo '[{"error":"没有找到数据"}]';
         echo json_encode($returnData);
     } else {
         echo '{"error":"没有找到数据"}';
     }
 }
开发者ID:tmlsoft,项目名称:main,代码行数:71,代码来源:OAHelperAction.class.php

示例4: lookupremindList

 /**
  *
  * @Title: lookupremindList
  * @Description: todo(获取用户提醒list)
  * @param unknown_type $map
  * @return unknown
  * @author renling
  * @date 2014-8-29 下午5:18:47
  * @throws
  */
 public function lookupremindList($map)
 {
     $uid = $_SESSION[C('USER_AUTH_KEY')];
     //提醒表
     $MisSystemRemindModel = D('MisSystemRemind');
     if ($map) {
         $userMap = $map;
     }
     $alluserid = array();
     //查询排除id
     $MisSystemRemindallList = $MisSystemRemindModel->where(" status=1 and userid ='all'  and deluserid not in (" . $uid . ")")->select();
     foreach ($MisSystemRemindallList as $akey => $aval) {
         if ($aval['deluserid']) {
             $deluserid = explode(",", $aval['deluserid']);
             if (in_array($uid, array_values($deluserid))) {
                 $alluserid[] = $aval['id'];
             }
         }
     }
     // 		if($alluserid){
     // 			$userMap['id']=array("not in",array_values($alluserid));
     // 		}
     $userMap['_string'] = "  userid =" . $uid . " or  userid ='all' and status=1 and deluserid not in (" . $uid . ")";
     $userMap['status'] = 1;
     $remindList = $MisSystemRemindModel->where($userMap)->select();
     $remindAllList = array();
     //当前时间
     $time = time();
     $nowtime = strtotime(transTime($time, 'Y-m-d') . " 00:00");
     //提醒中心单独查询条数
     $remindModel = D("MisSystemDataRemindMasView");
     foreach ($remindList as $key => $rval) {
         $count = 0;
         $sumcount = 0;
         $val = unserialize($rval['reminddetail']);
         if ($val['modulename']) {
             $model = D($val['modulename']);
         }
         //封装外层list
         $remindAllList[$rval['id']] = array('id' => $rval['id'], 'userid' => $rval['userid'], 'color' => $val['color'], 'title' => mb_substr($val['title'], 0, 2, 'utf-8'), 'map' => unserialize($rval['map']), 'name' => $val['modulename'], 'span' => $val['span']);
         //循环替换map里 time 以及特殊符号表示
         foreach ($val['list'] as $lkey => $lval) {
             if ($lval['map']) {
                 //替换map中不规范数据
                 $lval['map'] = str_replace(array('&quot;', '&#39;', '&lt;', '&gt;', '$uid', '$time', '$nowtime'), array('"', "'", '<', '>', $uid, $time, $nowtime), $lval['map']);
                 if ($val['modulename'] == 'MisWorkPlan') {
                     $planModel = D("MisWorkPlan");
                     $plan['_string'] = "( FIND_IN_SET('{$uid}', commentpeople) )";
                     //查询满足条件条数
                     $planlist = $planModel->field("id")->where($plan)->select();
                     if ($planlist) {
                         foreach ($planlist as $v) {
                             $comid .= "," . $v['id'];
                         }
                         $comid = substr($comid, 1);
                         $lval['map'] .= " and id not in (" . $comid . ")";
                     }
                 }
             }
             if ($val['modulename'] == "MisSystemDataRemindSub") {
                 $remindMap = array();
                 $remindMap['mis_system_data_remind_sub.status'] = 1;
                 //当前用户
                 $remindMap['mis_system_data_remind_sub.userid'] = $_SESSION[C('USER_AUTH_KEY')];
                 //未读
                 $remindMap['mis_system_data_remind_sub.isread'] = 0;
                 //弹框
                 $remindMap['mis_system_data_remind_sub.operation'] = 1;
                 $remindList = $remindModel->where($remindMap)->getField('pkey,modelname');
                 $count = count($remindList);
             } else {
                 //查询符合条件条数
                 $count = $model->where($lval['map'])->count('*');
             }
             $sumcount += $count;
             if ($count > 99) {
                 $count = '99+';
             }
             //封装符合条件子数组 list
             $remindAllList[$rval['id']]['list'][$lkey] = array('relhref' => $lval['relmodule'], 'remindMap' => base64_encode($lval['map']), 'showrules' => $lval['showmap'], 'rulesinfo' => $lval['listarr'], 'rules' => $lval['map'], 'count' => $count, 'keyv' => $lkey, 'reltitle' => $val['title'], 'rtitle' => $lval['rtitle']);
         }
         $remindAllList[$rval['id']]['sumcount'] = $sumcount;
     }
     //通过keyv 重新对数组进行排序
     array_sort($remindAllList, 'keyv', 'desc');
     //根据条数重新对数组进行排序
     $remindAllList = array_merge(array_sort($remindAllList, 'sumcount', 'desc'));
     return $remindAllList;
 }
开发者ID:tmlsoft,项目名称:main,代码行数:99,代码来源:MisSystemRemindModel.class.php

示例5: die

     $res = $db->LimitQuery($sql, $offset, $row, $params) or die($sql);
     $dataTable = $res->GetRows();
     foreach ($dataTable as $k => $v) {
         $uid = $v['uid'];
         //用户uid
         $bid = $v["blogid"];
         //动态id
         $cmnt = (int) $v['replynum'];
         //评论数
         $like = (int) $v['click3'];
         //喜欢
         $share = (int) $v['sharetimes'];
         //分享
         $message = $v["subject"];
         //动态内容225字
         $dataline = transTime($v["dateline"]);
         //发布时间
         $avatar = getAvatar($uid, "small");
         //用户头像
         //获取地点.
         $sql = "select resideprovince, residecity, residedist from disc_common_member_profile where uid='{$uid}'";
         $res = $db->Execute($sql) or die($sql);
         $province = $res->fields['resideprovince'] ? $res->fields['resideprovince'] : "北京";
         $city = $res->fields['residecity'] ? $res->fields['residecity'] : "北京";
         $dist = $res->fields['residedist'];
         $place = array($province, $city, $dist);
         $rows[$k] = array("bid" => $bid, "uid" => $uid, "nickname" => $v['username'], "place" => $place, "avatar" => $avatar, "dateline" => $dataline, "message" => $message, "view" => $v['viewnum'], "cmnt" => $cmnt, "like" => $like, "share" => $share);
     }
     $data = array("status" => "ok", "msg" => "data query done.", "page" => $page, "rows" => $rows);
 } else {
     if ($act == "like") {
开发者ID:xudong7930,项目名称:mobile,代码行数:31,代码来源:blog.php

示例6: guoqizhuanshou

 //当时间过期后转回当事人
 public function guoqizhuanshou()
 {
     //记录成功数
     $chenggongshu = 0;
     //获取当前时间戳
     $newtime = time();
     //实例化对象
     $modelMbw = M('mis_auto_guikc');
     $modelMonitoring = M('MisWorkMonitoring');
     $map = array();
     $map['shixiaoriqi'] = array('lt', $newtime);
     //是否已失效  0:表示未失效 1:表示已失效
     $map['yishixiao'] = 0;
     //创建流程转售查询
     $listMbw = $modelMbw->where($map)->field('id,shixiaoriqi,zhuanshougei,zhuanshouren')->select();
     //遍历每行数据
     foreach ($listMbw as $key => $val) {
         // 如果当前时间大于失效时间就把审核人变回原来的审核人
         if ($newtime > $val['shixiaoriqi']) {
             $map = array();
             $map['dostatus'] = '0';
             $map['zhuanshou'] = '1';
             $map['status'] = '1';
             $map['_string'] = 'FIND_IN_SET(  ' . $val['zhuanshougei'] . ',curAuditUser )';
             //查找到的人
             $listMonitoring = $modelMonitoring->field('id,curAuditUser,zhuanshou')->where($map)->select();
             //遍历misworkmonitoring中的每行数据 进行更新
             foreach ($listMonitoring as $mtkey => $mtval) {
                 $mtmap = array();
                 //以ID来更新
                 $mtmap['id'] = $mtval['id'];
                 //替换掉审核人
                 $mtval['curAuditUser'] = str_replace($val['zhuanshougei'], $val['zhuanshouren'], $mtval['curAuditUser']);
                 //另一种更新方法 同时改变转授状态 变回0未转授状态
                 $data = array('curAuditUser' => $mtval['curAuditUser'], 'zhuanshou' => '0', 'miaoshu' => '转授时间到期,未处理单据自动收回到原审核人');
                 $bool = $modelMonitoring->where($mtmap)->setField($data);
                 if ($bool == false) {
                     echo $modelMonitoring->getlastSql() . "执行转授审核人撤回失败sql,执行时间是" . transTime(time(), 'Y-m-d H:i:s') . "\n";
                 }
                 $chenggongshu++;
             }
             //将当前恢复过的数据进行失效处理
             $where = array();
             $where['id'] = $val['id'];
             $where['yishixiao'] = 1;
             $modelMbw->save($where);
         }
     }
     $this->transaction_model->commit();
     //事务提交
     echo "执行成功" . transTime(time(), 'Y-m-d H:i:s') . "\n";
开发者ID:tmlsoft,项目名称:main,代码行数:52,代码来源:MisAutoMbwExtendAction.class.php

示例7: ageList

 /**
  * @Title: ageList
  * @Description: todo(获取年龄阶段数据)
  * @return Ambigous <multitype:, string, number, unknown>
  * @author 杨东
  * @date 2014-2-27 上午11:38:11
  * @throws
  */
 private function ageList()
 {
     //人事模型
     $MisHrBasicEmployeeModel = D('MisHrBasicEmployee');
     //年龄配置模型
     $MisHrReportConfigurationModel = D('MisHrReportConfiguration');
     $MisHrReportConfigurationList = $MisHrReportConfigurationModel->where("status=1")->select();
     //当前时间
     $time = date('Y-m-d', strtotime(transTime(time())));
     $list = array();
     $listmap = array();
     foreach ($MisHrReportConfigurationList as $key => $val) {
         $startage = date('Y-m-d', strtotime("{$time} -" . $val['startage'] . " year"));
         $endage = date('Y-m-d', strtotime("{$time} -" . $val['endage'] . " year"));
         $listmap['status'] = 1;
         $listmap['working'] = 1;
         //在职
         $listmap['_string'] = 'birthday>= ' . strtotime($endage) . " AND birthday<=" . strtotime($startage);
         $list[$key]['name'] = $val['startage'] . '岁~' . $val['endage'] . "岁";
         //组成显示名称
         $count = $MisHrBasicEmployeeModel->where($listmap)->count('*');
         if ($count) {
             $list[$key]['count'] = $count;
         } else {
             $list[$key]['count'] = 0;
         }
     }
     return $list;
 }
开发者ID:tmlsoft,项目名称:main,代码行数:37,代码来源:MisSystemRemindReportAction.class.php

示例8: lookupGetdate

 /**
  * @Title: lookupGetdate
  * @Description: todo(获得存在数据库中的日程安排)
  * @author xiafengqin
  * @date 2013-7-11 上午11:23:50
  * @throws
  */
 public function lookupGetdate()
 {
     $start = strtotime($_POST['start']);
     $end = strtotime($_POST['end']);
     $model = D('MisUserEvents');
     $map = array();
     $map['status'] = 1;
     $map['_string'] = ' (FIND_IN_SET( ' . $_SESSION[C('USER_AUTH_KEY')] . ' , personid ) OR userid = ' . $_SESSION[C('USER_AUTH_KEY')] . ') and ( startdate <' . $end . ' and enddate >=' . $start . ')';
     $list = $model->where($map)->select();
     $arr = array();
     $bgcolor = $this->bgcolor;
     foreach ($list as $key => $value) {
         $start = transTime($value['startdate'], 'Y-m-d H:i:s');
         $end = transTime($value['enddate'], 'Y-m-d H:i:s');
         //86400秒=1天
         $allDay = true;
         if ($value['enddate'] - $value['startdate'] < 86400) {
             $allDay = false;
         }
         if (!$value['importancedegree']) {
             $value['importancedegree'] = 1;
         }
         $scheduletype = $value['scheduletype'] == 2 ? '[工作]' : '[个人]';
         $arr[] = array('id' => $value['id'], 'createid' => $value['createid'], 'title' => $scheduletype . missubstr($value['text'], 18, true), 'start' => $start, 'end' => $end, 'allDay' => $allDay, 'importancedegree' => $value['importancedegree'], 'className' => $bgcolor[$value['importancedegree']]['color']);
     }
     echo json_encode($arr);
 }
开发者ID:tmlsoft,项目名称:main,代码行数:34,代码来源:MisUserEventsAction.class.php

示例9: render


//.........这里部分代码省略.........
     					$html .='</div>';
     				}
     			}
     			$html.= '</div></div>';
     		}
     		$html .='</div></div>';
     		$html .='<div class="clear"></div>'; */
     //获取审核意见部分信息
     $ProcessInfoHistoryModel = D("ProcessInfoHistory");
     //查询最新流程
     $pihmap = array();
     //$pihmap['ptmptid'] = $data['ptmptid'];
     //$pihmap['tableid']	= $tableid;
     //$pihmap['tablename']= $tablename;
     $pihmap['projectid'] = $projectid;
     /* if($projectworkid){
     			$pihmap['projectworkid']=$projectworkid;
     		} */
     $pihmap['document'] = 1;
     $pihlist = $ProcessInfoHistoryModel->where($pihmap)->order('createtime asc')->select();
     //dump($ProcessInfoHistoryModel->getlastsql());
     //dump($pihlist);
     // 过滤回退以前的数据
     $ftrue = true;
     $judge = array();
     foreach ($pihlist as $k2 => $v2) {
         if ($v2['dotype'] == 2) {
             continue;
         }
         if ($ftrue) {
             $judge[] = $v2;
         }
     }
     $i = 0;
     $html .= '<div class="fieldset_show_box">';
     $html .= '	<legend class="fieldset_legend_toggle side-catalog-text side-catalog-firstanchor">';
     $html .= '		<a name="liuchengtu"></a><b>审批信息</b>';
     $html .= '		<div class="tml_style_line tml_sl4 tml_slb_blue"></div>';
     $html .= '	</legend>';
     $html .= '</div>';
     $html .= '<div class="tml_time_line">';
     $html .= '<p><span class="time_line_header">审批记录:</span></p>';
     $html .= '<div class="timeline">';
     $html .= '<div class="separator"></div>';
     foreach ($judge as $k3 => $v3) {
         if ($v3['ostatus'] > 0 || $v3['dotype'] == 5 || $v3['dotype'] == 8) {
             //dump($v3);
             //获取职级名称
             $dutyname = getFieldBy(getHrInfo($v3['userid'], "dutyid"), 'id', 'name', 'MisSystemDuty');
             $html .= '	<div class="timeline-entry group_bl_color">';
             $html .= '	<span class="time_warp">' . transTime($v3['dotime'], 'Y-m-d H:i') . '</span>';
             $html .= '	<div class="metadata">';
             $html .= '<p>审批人:<span class="group_per">' . getFieldBy($v3['userid'], 'id', 'name', 'user') . '【' . $dutyname . '】</span></p>';
             $html .= '</div>';
             $html .= '<div class="time_line_content">';
             $html .= '<ul class="tlc_ul1">';
             $html .= '<li>';
             $html .= '<span>审批意见:<span class="group_per">' . $v3['doinfo'] . '</span></span>';
             $html .= '<ul class="tlc_ul1 tlc_ul2" >';
             $html .= '<li style="list-style-type:none"></li>';
             $html .= '</ul>';
             $html .= '</li>';
             $html .= '</ul>';
             $html .= '</div>';
             $html .= '</div>';
             //获取用户的头像。
             /* 	$pic = $userModel->getUserPic($v3['userid']);
               		
               		$html .='<div class="check_info_content">';
               		if($i == 0)$html .='<div class="file_name">审批</div><div class="tml_style_line tml_slb_red"></div>';
               		//获取职级名称
               		$dutyname = getFieldBy(getHrInfo($v3['userid'],"dutyid"), 'id', 'name', 'MisSystemDuty');
               		$class = "";
               		if($v3['dotype'] == 6){
               			//打回的样式
               			$class = "tml_waring_color";
               		}
               		$html .='<div class="check_body">';
                       $html .='            <div class="check_body_left left">';
                       $html .='                <img width="45" src="'.$pic.'" alt="">';
                       $html .='            </div>';
                       $html .='            <div class="check_body_right left">';
                       $html .='                <div class="">';
                       $html .='                    <span class="author_color">'.getFieldBy($v3['userid'], 'id', 'name', 'user').'</span>';
                       $html .='                    <span class="tml-mr5 time_color">【'.$dutyname.'】</span>';
                       $html .='                    <span class="time_color">'.transTime($v3['createtime'],'Y-m-d H:i').'</span>';
                       $html .='                </div>';
                       $html .='                <div class="check_content '.$class.'">'.$v3['doinfo'].'</div>';
                       $html .='            </div>';
                       $html .='       </div>';
                       $html .='</div>';
                        */
             $i++;
         }
     }
     $html .= '</div>';
     $html .= '</div>';
     $html .= '</div>';
     return $html;
 }
开发者ID:tmlsoft,项目名称:main,代码行数:101,代码来源:ShowRecordWidget.class.php

示例10: array

     $affect_rows = $db->Affected_rows();
     if ($affect_rows > 0) {
         $data = array("status" => "ok", "info" => "处理成功");
     } else {
         $data = array("status" => "error", "info" => "处理失败");
     }
 } else {
     if ($act == "list") {
         //列出所有申请
         $rows = array();
         $tid = $_GET['tid'];
         $sql = "select * from disc_forum_activityapply where tid='{$tid}'";
         $res = $db->Execute($sql);
         $i = 0;
         while (!$res->EOF) {
             $rows[$i] = array("applyid" => $res->fields['applyid'], "tid" => $res->fields['tid'], "username" => $res->fields['username'], "uid" => $res->fields['uid'], "message" => $res->fields['message'], "dateline" => transTime($res->fields['dateline']), "payment" => $res->feilds['payment'], "ufielddata" => "");
             $i++;
             $res->MoveNext();
         }
     } else {
         if ($act == "invite") {
             //邀请好友参加活动
             $tuid = $_GET['touid'];
             $fuid = $_GET['fromuid'];
             $username = get_username($fuid);
             $tid = $_GET['tid'];
             $tuid = trim($tuid, ",");
             $tuids = explode(",", $tuid);
             //查询相关数据
             $sql = "select title from disc_forum_activity where tid='{$tid}'";
             $res = $db->Execute($sql);
开发者ID:xudong7930,项目名称:mobile,代码行数:31,代码来源:invite.php

示例11: foreach

<small>已有<?php 
echo $applicantsnumber;
?>
人报名</small>
<table class='table  table-bordered table-hover table-responsive'>
	<?php 
if ($applicantsnumber > 0) {
    foreach ($applicants as $applicant) {
        ?>
			<tr>
				<td><?php 
        echo empty($applicant['realname']) ? '匿名' : $applicant['realname'];
        ?>
</td>
				<td align="right"><?php 
        echo transTime($applicant['enroll_time']);
        ?>
</td>
			</tr>		
	<?php 
    }
}
?>
</table>
</div>

<div class="countdown">                        
	<p>报名剩余时间</p>                            
	<div class="cc">
		<div class="cd">
		  	<div><span>totalHours</span><i>时</i></div><div class="dot">:</div>			
开发者ID:iHamburg,项目名称:kqserver,代码行数:31,代码来源:event_ajaxenroll.php

示例12: getChildTaskTree

 /**
  * @Title: getChildTaskTree
  * @Description: todo(获取子节点)
  * @return array
  * @param $taskid taskid
  * @param $taskTree 节点树
  * @param $level 层级
  * @author jiangx
  * @throws
  */
 private function getChildTaskTree($taskid, &$taskTree, $level)
 {
     $level++;
     $model = D("MisTaskInformationView");
     $childtask = $model->where('mis_task.pid = ' . $taskid . ' AND mis_task.status = 1')->select();
     if (!$childtask) {
         return true;
     }
     foreach ($childtask as $key => $val) {
         $new = array();
         $new['id'] = $val['taskid'];
         $new['parent'] = $val['pid'];
         $new['loaded'] = true;
         $new['expanded'] = false;
         $new['level'] = $level;
         $new['remark'] = missubstr(strip_tags($val['remark']), 60, true);
         $new['title'] = missubstr($val['title'], 30, true);
         $new['begindate'] = transTime($val['begindate'], 'Y-m-d H:m');
         $new['enddate'] = transTime($val['enddate'], 'Y-m-d H:m');
         $new['executeuserid'] = $val['executeuser'];
         $new['executeuser'] = getFieldBy($val['executeuser'], 'id', 'name', 'User');
         $new['executingstatus'] = excelTplselected($val['executingstatus'], '1:未查看,2:已查看,3:进行中,4:关闭,5:暂停,6:完成,7:结束,8:申请暂停,0:未启动');
         $new['urgentstatus'] = excelTplselected($val['urgentstatus'], '1:<span class="levelGreen">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>,2:<span class="levelOrange">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>,3:<span class="levelRed">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>');
         $new['difficulty'] = excelTplselected($val['difficulty'], '1:简单,2:一般,3:困难,4:极难');
         $new['chedule'] = '<span class="taskprogressbar"><span class="taskpspan1" style="width:' . $val['chedule'] . '%;"></span><span class="taskpspan2">' . $val['chedule'] . '%</span></span>';
         $new['status'] = getStatus($val['status']);
         $new['button'] = "<a href='__URL__/lookupTask/id/" . $val['id'] . "' title='子任务基本信息查看' target='dialog' width='600' height='500' mask='true'>基本信息</a>";
         $taskTree[$new['id']] = $new;
         $isLeaf = $this->getChildTaskTree($val['taskid'], $taskTree, $level);
         $taskTree[$new['id']]['isLeaf'] = $isLeaf;
     }
     return false;
 }
开发者ID:tmlsoft,项目名称:main,代码行数:43,代码来源:MisTaskInformationAction.class.php

示例13: lookupGetdate

 /**
  * @Title: lookupGetdate 
  * @Description: todo(加载选中数据)   
  * @author liminggang 
  * @date 2013-7-3 上午11:07:34 
  * @throws
  */
 public function lookupGetdate()
 {
     $name = 'MisWorkStatement';
     $model = M('mis_work_statement');
     $map = array();
     $map['status'] = 1;
     $starttime = strtotime($_REQUEST['starttime']);
     $endtime = strtotime($_REQUEST['endtime']);
     /* if (! empty ( $name )) {
     			$qx_name=$name;
     			//验证浏览及权限
     			if( !isset($_SESSION['a']) ){
     				if( $_SESSION[strtolower($qx_name.'_'.ACTION_NAME)]!=1 ){
     					if( $_SESSION[strtolower($qx_name.'_'.ACTION_NAME)]==2 ){////判断部门及子部门权限
     						$map["createid"]=array("in",$_SESSION['user_dep_all_child']);
     					}else if($_SESSION[strtolower($qx_name.'_'.ACTION_NAME)]==3){//判断部门权限
     						$map["createid"]=array("in",$_SESSION['user_dep_all_self']);
     					}else if($_SESSION[strtolower($qx_name.'_'.ACTION_NAME)]==4){//判断个人权限
     						$map["createid"]=$_SESSION[C('USER_AUTH_KEY')];
     					}
     				}
     			}
     		} */
     $map["createid"] = $_SESSION[C('USER_AUTH_KEY')];
     $map['createtime'] = array("exp", ">=" . $starttime . " and createtime <" . $endtime);
     $list = $model->where($map)->field('id,createtime')->select();
     $aaa = $arr = array();
     foreach ($list as $key => $value) {
         $daytime = date("Y-m-d", $value['createtime']);
         $daytime = strtotime($daytime);
         if (!in_array($daytime, $aaa)) {
             $start = transTime($value['createtime'], 'Y-m-d H:i:s');
             $end = transTime($value['createtime'] + 1, 'Y-m-d H:i:s');
             $arr[] = array('id' => $value['id'], 'title' => "", 'start' => $start, 'end' => $end, 'tdclassName' => 'pred');
             array_push($aaa, $daytime);
         }
     }
     echo json_encode($arr);
 }
开发者ID:tmlsoft,项目名称:main,代码行数:46,代码来源:MisWorkStatementAction.class.php

示例14: doFlowsMessage

    /**
     * @Title: doFlowsMessage
     * @Description: todo(处理协同发送消息) 
     * @param 接收人 $auserid
     * @param 标题 $title
     * @param 协同ID $ids
     * @param 处理类型 $type :“审核”、“终止”
     * @author 杨东 
     * @date 2014-4-25 上午11:55:21 
     * @throws 
     */
    private function doFlowsMessage($auserid, $title, $ids, $type)
    {
        //发布人
        $name = getFieldBy($_SESSION[C('USER_AUTH_KEY')], 'id', 'name', 'user');
        //发送的系统日志的标题
        $messageTitle = $name . $type . '了您发送的协同事项【' . $title . '】 ,请查阅!  ' . transTime(time(), 'Y-m-d H:i');
        //系统日志的内容
        $messageContent = '
			<p></p>
			<span></span>
			<div style="width:98%;">
				<p class="font_darkblue">&nbsp;您好!</p>
				<p>&nbsp;&nbsp;&nbsp;&nbsp;<strong>' . $name . "&nbsp;" . $type . ' </strong>了您发送的协同事项【
				<a class="redo tml-c-blue" style="text-decoration: underline" href="__APP__/MisOaItems/view/id/' . $ids . '" target="navTab" title="协同事项_查看" rel="MisOaItemsview">' . $title . '</a>
				】 ,请点击链接进行查阅!。</p>
				<p>&nbsp;&nbsp;&nbsp;&nbsp;如果您有任何问题,请联系' . $name . '。</p>
			</div>';
        //系统推送消息
        $this->pushMessage($auserid, $messageTitle, $messageContent);
    }
开发者ID:tmlsoft,项目名称:main,代码行数:31,代码来源:CommonFlowsAction.class.php

示例15: myEvents

 /**
  * @Title: myEvents
  * @Description: todo(我的日程管理,在我的桌面日历上面标记我的日程)
  * @author liminggang
  * @date 2013-12-30 下午3:19:48
  * @throws
  */
 private function myEvents()
 {
     //获取当前登录用户
     $userid = $_SESSION[C('USER_AUTH_KEY')];
     //获取当前登录人的日程
     $model = D('MisUserEvents');
     //获取当前月份的日程
     // 		$y=date("Y",time());
     // 		$m=date("m",time());
     // 		$d=date("d",time());
     // 		$t0=date('t');           // 本月一共有几天
     // 		$starttime=mktime(0,0,0,$m,1,$y);        // 创建本月开始时间
     // 		$endtime=mktime(23,59,59,$m,$t0,$y);       // 创建本月结束时间
     $map['_string'] = 'FIND_IN_SET(  ' . $userid . ',personid ) or userid = ' . $_SESSION[C('USER_AUTH_KEY')];
     $map['status'] = 1;
     $list = $model->where($map)->select();
     //第二部,分解日程,特别是一个日程中连续夸天数的。拆分开
     if ($list) {
         $num = count($list);
         foreach ($list as $key => $val) {
             $a = strtotime(transTime($val['startdate']));
             $b = strtotime(transTime($val['enddate']));
             $x = ($b - $a) / 86400;
             if ($x) {
                 for ($i = 1; $i <= $x; $i++) {
                     $val['begintime'] = strtotime("+" . $i . " day", $a);
                     $list[$num] = $val;
                     $num++;
                 }
             }
             $list[$key]['begintime'] = $a;
         }
     }
     $arr = array();
     //第三部、分解一天中多个日程。
     if ($list) {
         foreach ($list as $k => $v) {
             $str = htmlspecialchars_decode($v['details'], ENT_QUOTES);
             //转码
             $str = trim(strip_tags(str_replace("&nbsp;", ' ', $str)));
             //过滤html
             $v['details'] = $str;
             if (!in_array($v['begintime'], array_keys($arr))) {
                 $arr[$v['begintime']][] = $v;
             } else {
                 $arr[$v['begintime']][] = $v;
             }
         }
     }
     //第四部、判断日程属于那种类型,1,2,3
     $azz = array();
     foreach ($arr as $k1 => $v1) {
         $self = 1;
         foreach ($v1 as $k2 => $v2) {
             if ($v2['userid'] == $userid) {
                 $self = 1;
                 //自己发
                 if (in_array($userid, explode(",", $v2['personid']))) {
                     $self = 3;
                     break;
                 }
             } else {
                 if (in_array($userid, explode(",", $v2['personid']) && $v2['userid'] != $userid)) {
                     $self = 2;
                     //别人发的。
                 }
             }
         }
         $azz[$k1][$self] = $v1;
     }
     $this->assign('myEvents', json_encode($azz));
 }
开发者ID:tmlsoft,项目名称:main,代码行数:79,代码来源:MisSystemPanelMethodAction.class.php


注:本文中的transTime函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。