📄 diary.php
字号:
<?
/********************************************************************************/
/* 极限办公自动化系统 (极限OA) */
/* ======================== */
/* 欢迎使用 极限OA,在您开始使用之前,请务必完整阅读本软件附带的全部说明档 */
/********************************************************************************/
/* Welcome to http://www.xsp.cn & http://oa.xsp.cn */
/* 技术支持论坛 http://www.1119.net */
/********************************************************************************/
/* 商业购买请联系 临海市极限网络有限公司 */
/* 联系电话: (0576) 5131349 邮件: mkt@xsp.cn QQ: 562873 */
/********************************************************************************/
if(!defined('KIN_UNION')){die("Hacking attempt");}
$pre_s = true;
if($sysaction == 'del') {
if(is_array($delete)) {
$ids = "0";
foreach($delete as $val) {
$ids .= ",$val";
}
$db->query("DELETE FROM $table_diary WHERE id IN ($ids)");
}elseif($id) {
$db->query("DELETE FROM $table_diary WHERE id='$id'");
}
header("Location:memassist.php?action=diary");
}
if($sysaction == 'add') {
if($m_date && $title && $content) {
if($id) {
$db->query("update $table_diary set title='$title',content='$content',date='$m_date' where id='$id'");
header("Location:client.php?action=client");
}else {
$m_time = date('H:i:s',$timestamp);
$db->query("insert into $table_diary (title,content,date,time,mid)
values ('$title','$content','$m_date','$m_time','$union_uid')");
}
header("Location:memassist.php?action=diary");
}else {
$pre_s = false;
if($id) {
$mem_t = $db->query_fetch("select * from $table_diary where id='$id'");
}
$ttime = $ttime?$ttime:date('Y-m-d',$timestamp);
$ttime = $id?$mem_t['time']:$ttime;echo $ttime.$mem_t['time'];
}
}elseif($sysaction == 'show') {
$dia_t = $db->query_fetch("select * from $table_diary where id='$id'");
foreach($dia_t as $key=>$val) {
if(empty($val))
$dia_t[$key] = '空';
}
//$dia_t[content] = nl2br($dia_t[content]);
include getData('memassist_diary_show');
exit;
}
if($pre_s) {
$timestamp2 = $timestamp2?$timestamp2:$timestamp;
$s_year = date('Y',$timestamp2);
$s_mon = date('m',$timestamp2);
$s_day = date('d');
if($s_month == 'next') {
if($s_mon == 12) {
$s_year2 = $s_year + 1;
$s_mon2 = 1;
}else {
$s_year2 = $s_year;
$s_mon2 = $s_mon + 1;
}
$timestamp2 = mktime(0,0,0,$s_mon2,1,$s_year2);
}elseif($s_month == 'prev') {
if($s_mon == 1) {
$s_year2 = $s_year - 1;
$s_mon2 = 12;
}else {
$s_year2 = $s_year;
$s_mon2 = $s_mon - 1;
}
$timestamp2 = mktime(0,0,0,$s_mon2,1,$s_year2);
}elseif($s_month == 'this' || !$s_month) {
$s_year2 = date('Y');
$s_mon2 = date('m');
$timestamp2 = $timestamp;
}
$query = $db->query("select id,date,time,title from $table_diary where date like '$s_year2-$s_mon2-%' order by time DESC");
while($list = $db->fetch_array($query)) {
$diary_count[$list['date']] ++;
$diary_list[$list['date']][$list['id']] = $list;
}
include 'memassist/diary_calendar.php';
$D=new Calendar($s_year2,$s_mon2,$s_day,$diary_list,$diary_count);
$out = $D->OUT();
}
include getData('memassist_diary');
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -