<?php (!defined('IN_TOA') || !defined('IN_ADMIN')) && exit('Access Denied!'); //if ( !is_superadmin() && !check_purview('manage_link') ) prompt('对不起,你没有权限执行本操作!'); empty($do) && ($do = 'list'); if ($do == 'list') { //列表信息 $wheresql = ''; $url = getGP('weburl', 'P'); $keyword = $_POST[keyword]; $department = $_POST[department]; if ($keyword != '') { $wheresql .= " AND a.name LIKE '%{$keyword}%'"; $url .= '&keyword=' . rawurlencode($keyword); } if ($department != '') { $wheresql .= " AND b.departmentid = '" . $department . "'"; $url .= '&department=' . $department; } $sql = "SELECT * FROM " . DB_TABLEPRE . "user_view a," . DB_TABLEPRE . "user b WHERE a.uid=b.id {$wheresql} ORDER BY a.uid asc"; $result = $db->fetch_all($sql); include_once 'template/sms.php'; }
include_once 'mana/template_edit.php'; } elseif ($do == 'editsave') { $tplid = getGP('tplid', 'P', 'int'); $title = getGP('title', 'P'); $typeid = getGP('typeid', 'P'); $tplkey = getGP('tplkey', 'P'); if (getGP('tpluser', 'P') != '') { $tpluser = getGP('tpluser', 'P'); } else { $tpluser = '******'; } if (getGP('tpladmin', 'P') != '') { $tpladmin = getGP('tpladmin', 'P'); } else { $tpladmin = '0'; } $tpladdr = getGP('tpladdr', 'P'); //主表信息 $workclass_template = array('title' => $title, 'typeid' => $typeid, 'tplkey' => $tplkey, 'tpluser' => $tpluser, 'tpladmin' => $tpladmin, 'tpladdr' => $tpladdr); update_db('workclass_template', $workclass_template, array('tplid' => $tplid)); //更新表单 $workclass_from = array('typeid' => $typeid); update_db('workclass_from', $workclass_from, array('tplid' => $tplid)); //更新流程 $workclass_flow = array('typeid' => $typeid); update_db('workclass_flow', $workclass_flow, array('tplid' => $tplid)); $content = serialize($workclass_template); $title = '编辑工作流模板'; get_logadd($id, $content, $title, 35, $_USER->id); show_msg('工作流模板修改成功!', 'admin.php?ac=' . $ac . '&fileurl=' . $fileurl . ''); }
<?php (!defined('IN_TOA') || !defined('IN_ADMIN')) && exit('Access Denied!'); get_key("file_Increase"); empty($do) && ($do = 'list'); if ($do == 'list') { include_once 'template/add.php'; } elseif ($do == 'save') { $savetype = getGP('savetype', 'P'); $filetype = getGP('filetype', 'P'); $filenumber = getGP('filenumber', 'P'); $filename = getGP('filename', 'P'); $enddate = getGP('enddate', 'P'); $position = getGP('position', 'P'); $page = getGP('page', 'P'); $appendix = getGP('file1', 'P') . "," . getGP('file2', 'P') . "," . getGP('file3', 'P'); $content = getGP('content', 'P'); $file = array('filetype' => $filetype, 'filenumber' => $filenumber, 'filename' => $filename, 'enddate' => $enddate, 'position' => $position, 'page' => $page, 'appendix' => $appendix, 'content' => $content, 'type' => '0', 'date' => get_date('Y-m-d H:i:s', PHP_TIME), 'uid' => $_USER->id); insert_db('file', $file); $id = $db->insert_id(); $content = serialize($file); $title = '新增档案信息'; get_logadd($id, $content, $title, 20, $_USER->id); show_msg('新增档案信息成功!', 'admin.php?ac=index&fileurl=file'); }
if ($do == 'list') { //列表信息 $wheresql = ''; $page = max(1, getGP('page', 'G', 'int')); $pagesize = $_CONFIG->config_data('pagenum'); $offset = ($page - 1) * $pagesize; $url = 'admin.php?ac=' . $ac . '&fileurl=' . $fileurl . ''; if ($keyword = getGP('keyword', 'G')) { $wheresql .= " AND (b.name LIKE '%{$keyword}%' OR a.username LIKE '%{$keyword}%')"; $url .= '&keyword=' . rawurlencode($keyword); } if ($department = getGP('department', 'G', 'int')) { $wheresql .= " AND a.departmentid = {$department}"; $url .= '&department=' . $department; } if ($usergroup = getGP('usergroup', 'G', 'int')) { $wheresql .= " AND a.groupid = {$usergroup}"; $url .= '&usergroup=' . $usergroup; } $num = $db->result("SELECT COUNT(*) AS num FROM " . DB_TABLEPRE . "user a," . DB_TABLEPRE . "user_view b WHERE a.id=b.uid {$wheresql}"); $sql = "SELECT * FROM " . DB_TABLEPRE . "user a," . DB_TABLEPRE . "user_view b WHERE a.id=b.uid {$wheresql} ORDER BY a.numbers ASC LIMIT {$offset}, {$pagesize}"; $result = $db->fetch_all($sql); include_once 'template/user.php'; } //读取上级部门 function get_father($fid) { global $db; $query = $db->query("SELECT name FROM " . DB_TABLEPRE . "department where id='" . $fid . "' ORDER BY id desc limit 0,1"); while ($rowuser = $db->fetch_array($query)) { $html .= $rowuser[name];
?> " /> <input type="hidden" name="perid" value="<?php echo $perid; ?> " /> <input type="hidden" name="oldappflow" value="<?php echo getGP('oldappflow', 'P'); ?> " /> <input type="hidden" name="content" value="<?php echo getGP('content', 'P'); ?> " /> <input type="hidden" name="viewuser" value="<?php echo getGP('viewuser', 'P'); ?> " /> <input type="hidden" name="pkey" value="3" /> <input type="hidden" name="views" value="3" /> <table class="TableBlock" border="0" width="70%" align="center"> <tr> <td nowrap class="TableHeader" colspan="2"><b> 审批操作</b></td> </tr> <?php echo '<tr><td nowrap class="TableContent" width="15%"> 退回审批人员:</td>'; echo '<td class="TableData">'; //设定下一步审批信息 echo '<input type="hidden" name="flowid" value="' . $flow['fid'] . '" />'; echo '<input type="hidden" name="appkey" value="' . $flow['flowkey2'] . '" />';
(!defined('IN_TOA') || !defined('IN_ADMIN')) && exit('Access Denied!'); get_key("office_communication_Increase"); empty($do) && ($do = 'list'); if ($do == 'list') { include_once 'template/add.php'; } elseif ($do == 'save') { $savetype = getGP('savetype', 'P'); $company = getGP('company', 'P'); $person = getGP('person', 'P'); $tel = getGP('tel', 'P'); $phone = getGP('phone', 'P'); $fax = getGP('fax', 'P'); $mail = getGP('mail', 'P'); $zipcode = getGP('zipcode', 'P'); $address = getGP('address', 'P'); $position = getGP('position', 'P'); $sex = getGP('sex', 'P'); $msn = getGP('msn', 'P'); $date = get_date('Y-m-d h:i:s', PHP_TIME); $type = getGP('type', 'P'); $uid = $_USER->id; //主表信息 $communication = array('company' => $company, 'person' => $person, 'tel' => $tel, 'phone' => $phone, 'fax' => $fax, 'mail' => $mail, 'zipcode' => $zipcode, 'address' => $address, 'position' => $position, 'sex' => $sex, 'msn' => $msn, 'type' => $type, 'date' => $date, 'uid' => $uid); //写入主表信息 insert_db('communication', $communication); $id = $db->insert_id(); $content = serialize($communication); $title = '添加通迅录'; get_logadd($id, $content, $title, 9, $_USER->id); show_msg('添加通迅录成功!', 'admin.php?ac=index&fileurl=communication&type=' . $type . ''); }
<?php (!defined('IN_TOA') || !defined('IN_ADMIN')) && exit('Access Denied!'); empty($do) && ($do = 'list'); if ($do == 'edit') { $id = getGP('id', 'G', 'int'); $workdate = $db->fetch_one_array("SELECT * FROM " . DB_TABLEPRE . "book_type WHERE id = '{$id}' "); include_once 'template/file_type_edit.php'; } elseif ($do == 'save') { $savetype = getGP('savetype', 'P'); $id = getGP('id', 'P', 'int'); $title = getGP('title', 'P'); $father = getGP('father', 'P'); $keyuser = getGP('keyuser', 'P'); //$uid=$_USER->id; $book_type = array('title' => $title, 'father' => $father, 'keyuser' => $keyuser); update_db('book_type', $book_type, array('id' => $id)); $content = serialize($book_type); $title = '编辑图书类别'; get_logadd($id, $content, $title, 22, $_USER->id); show_msg('您要处理的信息操作成功!', 'admin.php?ac=file_type&fileurl=' . $fileurl . ''); } function GET_FILE_PUBLIC_LIST($fatherid = 0, $selid = 0, $layer = 0) { $str = ""; global $db; $query = $db->query("SELECT * FROM " . DB_TABLEPRE . "book_type where father='{$fatherid}' ORDER BY id Asc "); if (count($query) > 0) { for ($i = 0; $i < $layer; $i++) { $str .= "├"; }
<?php (!defined('IN_TOA') || !defined('IN_ADMIN')) && exit('Access Denied!'); get_key("office_goods_key"); empty($do) && ($do = 'list'); if ($do == 'list') { $id = getGP('id', 'G', 'int'); $blog = $db->fetch_one_array("SELECT * FROM " . DB_TABLEPRE . "office_goods_key order by id desc"); include_once 'template/office_goods_key.php'; } elseif ($do == 'save') { $savetype = getGP('savetype', 'P'); $id = getGP('id', 'P', 'int'); $purchase = getGP('purchase', 'P'); $examination = getGP('examination', 'P'); $warehousing = getGP('warehousing', 'P'); $office_goods_key = array('purchase' => $purchase, 'examination' => $examination, 'warehousing' => $warehousing); if ($id != '') { update_db('office_goods_key', $office_goods_key, array('id' => $id)); } else { insert_db('office_goods_key', $office_goods_key); } show_msg('您要处理的信息操作成功!', 'admin.php?ac=office_goods_key&fileurl=' . $fileurl . ''); } //读取部门 function GET_FILE_PUBLIC_LIST($fatherid = 0, $selid = 0, $layer = 0) { $str = ""; global $db; $query = $db->query("SELECT * FROM " . DB_TABLEPRE . "goods_type where father='{$fatherid}' ORDER BY id Asc "); if (count($query) > 0) { for ($i = 0; $i < $layer; $i++) {
<?php /* [Office 515158] (C) 2009-2012 天生创想 Inc. $Id: ads.php 1209087 2012-01-08 08:58:28Z baiwei.jiang $ */ define('IN_ADMIN', True); require_once '../include/common.php'; global $db; $config = $db->fetch_one_array("SELECT * FROM " . DB_TABLEPRE . "config WHERE id ='1' "); if (getGP('number', 'G') == $config['com_number']) { //$_ADS=new ads(); $code = new ugcode(); if (getGP('delete', 'G') != '') { $_ADS->ads_connection(2, 0, 0, getGP('cid', 'G'), 0, 0); } else { //$ad_add->ads_connection(2,0,0,0,0,0); $_ADS->ads_connection(1, $code->ugcode_vod(2, getGP('title', 'G')), getGP('adsurl', 'G'), getGP('cid', 'G'), 0, getGP('color', 'G')); } } ?>
} } //通知审批人员 if (getGP('sms_info_box_shownamemaster', 'P') != '') { $content1 = '您有一个工作流程需要审批,请点击进入工作流进行审批!'; SMS_ADD_POST(getGP('staff', 'P'), $content1, 0, 0, $_USER->id); } //手机短信 if (getGP('sms_phone_box_shownamemaster', 'P') != '') { $content2 = '您有一个工作流程需要审批,请登录OA进行审批!'; PHONE_ADD_POST(getGP('staffphone', 'P'), $content2, getGP('staff', 'P'), 0, 0, $_USER->id); } $content = serialize($personnel1); $title = '审批工作流'; get_logadd($id, $content, $title, 14, $_USER->id); show_msg('工作流己成功审批!', 'admin.php?ac=' . str_replace('crm_', '', getGP('modid', 'P')) . '&fileurl=' . $fileurl . ''); } else { //获取工作流信息 $sql = "SELECT * FROM " . DB_TABLEPRE . $_GET['modid'] . " WHERE id = '" . $_GET['viewid'] . "'"; $row = $db->fetch_one_array($sql); //获取当前流程 $sql = "SELECT a.*,b.flowname,b.flownum,b.flowuser,b.flowkey,b.flowkey1,b.flowkey2,b.flowkey3 FROM " . DB_TABLEPRE . "crm_personnel a," . DB_TABLEPRE . "crm_flow b WHERE a.flowid=b.fid and a.viewid = '" . $_GET['viewid'] . "' and a.modid = '" . $_GET['modid'] . "' and (a.pertype=0 or a.pertype=4) order by a.perid desc"; $per = $db->fetch_one_array($sql); if ($per['flowkey'] != '2') { //获取下一步流程 $sql = "SELECT * FROM " . DB_TABLEPRE . "crm_flow WHERE flownum >'" . $per['flownum'] . "' and modid='" . $_GET['modid'] . "' order by flownum asc"; $flow = $db->fetch_one_array($sql); } $perlnums = $db->result("SELECT COUNT(*) AS perlnums FROM " . DB_TABLEPRE . "crm_personnel_log where perid='" . $per['perid'] . "' and pertype=0 and viewid = '" . $_GET['viewid'] . "' and modid='" . $_GET['modid'] . "'"); if ($per['appkey'] == 1 && $per['appkey1'] == 1) { $wherestr = $perlnums < 2 && $per['flowkey'] != 2;
show_msg('你己成功参与 "' . get_inc_app_types($app_id) . '"的投票!', 'admin.php?ac=' . $ac . '&fileurl=' . $fileurl . '&do=views&id=' . $app_id . ''); } else { $app_id = getGP('id', 'G', 'int'); global $db; $sql = "SELECT * FROM " . DB_TABLEPRE . "app_log WHERE app_id = '" . $app_id . "' and user='******' "; $app_log = $db->fetch_one_array($sql); if ($app_log["user"] == '') { $name = '在线投票 "' . get_inc_app_types($app_id) . '"'; } else { $name = '查看 "' . get_inc_app_types($app_id) . '"投票记录'; } $sql = "SELECT * FROM " . DB_TABLEPRE . "app_option where app_id='" . $app_id . "' ORDER BY id Asc"; $result = $db->fetch_all($sql); $sql = "SELECT * FROM " . DB_TABLEPRE . "app_log where app_id='" . $app_id . "' ORDER BY id Asc"; $relog = $db->fetch_all($sql); $appadmin = $db->fetch_one_array("SELECT id FROM " . DB_TABLEPRE . "app WHERE id = '" . $app_id . "' and (user like '%" . get_realname($_USER->id) . "%' or user='') "); include_once 'template/views.php'; } } elseif ($do == 'app_log') { $app_id = getGP('app_id', 'G', 'int'); $wheresql = ''; $page = max(1, getGP('page', 'G', 'int')); $pagesize = $_CONFIG->config_data('pagenum'); $offset = ($page - 1) * $pagesize; $url = 'admin.php?ac=' . $ac . '&fileurl=' . $fileurl . '&do=app_log'; $wheresql .= " AND app_id='" . $app_id . "'"; $num = $db->result("SELECT COUNT(*) AS num FROM " . DB_TABLEPRE . "app_log WHERE 1 {$wheresql} ORDER BY id desc"); $sql = "SELECT * FROM " . DB_TABLEPRE . "app_log WHERE 1 {$wheresql} ORDER BY id desc LIMIT {$offset}, {$pagesize}"; $result = $db->fetch_all($sql); include_once 'template/app_log.php'; }
<?php /* [Office 515158] (C) 2009-2012 天生创想 Inc. $Id: oa 1209087 2012-01-08 08:58:28Z baiwei.jiang $ */ (!defined('IN_TOA') || !defined('IN_ADMIN')) && exit('Access Denied!'); //if ( !is_superadmin() && !check_purview('manage_link') ) prompt('对不起,你没有权限执行本操作!'); empty($do) && ($do = 'list'); if ($do == 'list') { include_once 'template/dep_radio.php'; } elseif ($do = 'add') { if (getGP('inputname', 'G') != '') { $participation = getGP('inputname', 'G'); } else { $participation = 'participation'; } echo "<script>window.opener.document.save." . $participation . ".value='" . $_GET[name] . "';</script>"; echo "<script>window.opener.document.save." . $participation . "id.value='" . $_GET[id] . "';</script>"; echo '<script language="JavaScript">window.close()</script>'; } //读取部门 function public_list($fatherid = 0, $selid = 0, $layer = 0, $ac, $fileurl) { global $db; $sql = "SELECT * FROM " . DB_TABLEPRE . "department where father='{$fatherid}' ORDER BY id Asc"; $query = $db->query($sql); echo '<tbody id="group_' . trim($fatherid) . '">'; if (count($query) > 0) { while ($row = $db->fetch_array($query)) { $rsfno = $db->fetch_one_array("SELECT * FROM " . DB_TABLEPRE . "department where father='" . $row[id] . "' ORDER BY id asc limit 0,1");
<?php (!defined('IN_TOA') || !defined('IN_ADMIN')) && exit('Access Denied!'); get_key("office_sms_Increase"); empty($do) && ($do = 'list'); if ($do == 'list') { include_once 'template/smsadd.php'; } elseif ($do == 'save') { $savetype = getGP('savetype', 'P'); $content = trim(preg_replace("/[\\s]+/", '', getGP('content', 'P'))); PHONE_ADD_POST(getGP('receivephone', 'P'), $content, getGP('receive', 'P'), 0, 0, $_USER->id); $content = getGP('receivephone', 'P') . get_log(1) . getGP('content', 'P') . get_log(1) . getGP('receive', 'P') . get_log(1) . $_USER->id; $title = '发送手机短信'; get_logadd($id, $content, $title, 6, $_USER->id); show_msg('手机短信发送成功!', 'admin.php?ac=smsindex&fileurl=sms'); }
(!defined('IN_TOA') || !defined('IN_ADMIN')) && exit('Access Denied!'); get_key("config_inc"); empty($do) && ($do = 'list'); if ($do == 'list') { include_once 'template/version.php'; } elseif ($do == 'save') { for ($i = 1; $i <= 16; $i++) { if ($i % 4 == 0 && $i < 16) { $strs = '-'; } else { $strs = ''; } $namearr .= getGP('t' . $i . '', 'P') . $strs; } if (getGP('com_number', 'P') != '') { $namearr = getGP('com_number', 'P'); } $httpurl = $_CONFIG->confgi_url() . '/office/' . $_CONFIG->config_oaurl('version') . '?nums=' . $_POST["nums"] . '&number=' . strtoupper(trim($namearr)); $re_user = Utility::HttpRequest($httpurl . '&date=' . get_date('YmdHis', PHP_TIME)); $re_user = explode('|', $re_user); //数据处理 if ($re_user[0] != '1') { //com_name if ($_CONFIG->config_data_name('com_name') != '') { get_config_update('com_name', $re_user[0]); } else { get_config_insert('com_name', $re_user[0]); } //com_person if ($_CONFIG->config_data_name('com_person') != '') { get_config_update('com_person', $re_user[1]);
} elseif ($do == 'add') { include_once 'mana/type_add.php'; } elseif ($do == 'addsave') { $project_type[title] = getGP('title', 'P'); $project_type[manauser] = getGP('manauser', 'P'); $project_type[keyuser] = getGP('keyuser', 'P'); $project_type[type1] = getGP('type1', 'P'); $project_type[type2] = '1'; $project_type[uid] = $_USER->id; //写入主表信息 insert_db('project_type', $project_type); $id = $db->insert_id(); $content = serialize($project_type); $title = '添加项目类别'; get_logadd($id, $content, $title, 32, $_USER->id); show_msg('项目类别添加成功!', 'admin.php?ac=' . $ac . '&fileurl=' . $fileurl . ''); } elseif ($do == 'edit') { $tid = getGP('tid', 'G', 'int'); $view = $db->fetch_one_array("SELECT * FROM " . DB_TABLEPRE . "project_type WHERE tid = '{$tid}'"); include_once 'mana/type_edit.php'; } elseif ($do == 'editsave') { $project_type[title] = getGP('title', 'P'); $project_type[manauser] = getGP('manauser', 'P'); $project_type[keyuser] = getGP('keyuser', 'P'); $project_type[type1] = getGP('type1', 'P'); update_db('project_type', $project_type, array('tid' => getGP('tid', 'P'))); $content = serialize($project_type); $title = '编辑项目类别'; get_logadd($id, $content, $title, 32, $_USER->id); show_msg('项目类别修改成功!', 'admin.php?ac=' . $ac . '&fileurl=' . $fileurl . ''); }
$project_model[key3] = getGP('key3', 'P'); $project_model[key4] = getGP('key4', 'P'); $project_model[uid] = $_USER->id; //写入主表信息 insert_db('project_model', $project_model); $id = $db->insert_id(); if (getGP('key3', 'P') == 0 && getGP('key4', 'P') == '3') { $db->query("update " . DB_TABLEPRE . "project_model set addr='" . $typeid . "_" . $id . ".php' where mid=" . $id); } $content = serialize($project_model); $title = '添加项目模型'; get_logadd($id, $content, $title, 32, $_USER->id); show_msg('项目模型添加成功!', 'admin.php?ac=' . $ac . '&fileurl=' . $fileurl . '&typeid=' . $typeid); } elseif ($do == 'edit') { $mid = getGP('mid', 'G', 'int'); $view = $db->fetch_one_array("SELECT * FROM " . DB_TABLEPRE . "project_model WHERE mid = '{$mid}'"); include_once 'mana/model_edit.php'; } elseif ($do == 'editsave') { $project_model[modname] = getGP('modname', 'P'); $project_model[manauser] = getGP('manauser', 'P'); $project_model[keyuser] = getGP('keyuser', 'P'); $project_model[key1] = getGP('key1', 'P'); $project_model[key2] = getGP('key2', 'P'); $project_model[key3] = getGP('key3', 'P'); $project_model[key4] = getGP('key4', 'P'); update_db('project_model', $project_model, array('mid' => getGP('mid', 'P'))); $content = serialize($project_model); $title = '编辑项目模型'; get_logadd($id, $content, $title, 32, $_USER->id); show_msg('项目模型修改成功!', 'admin.php?ac=' . $ac . '&fileurl=' . $fileurl . '&typeid=' . $typeid); }
<?php (!defined('IN_TOA') || !defined('IN_ADMIN')) && exit('Access Denied!'); get_key("office_sms_channel"); empty($do) && ($do = 'list'); if ($do == 'list') { $blog = $db->fetch_one_array("SELECT * FROM " . DB_TABLEPRE . "phone_channel order by id desc"); include_once 'template/channel_edit.php'; } elseif ($do == 'save') { $savetype = getGP('savetype', 'P'); //发送消息表 $phone_channel = array('username' => getGP('username', 'P'), 'password' => getGP('password', 'P')); update_db('phone_channel', $phone_channel, array('id' => 1)); //insert_db('channel_edit',$channel_edit); show_msg('信息更新成功!', 'admin.php?ac=channel_edit&fileurl=sms'); }
} if (isset($query['imgsrc'])) { if ($query['imgsrc']) { $where[] = "imgsrc!=''"; } else { $where[] = "imgsrc=''"; } } if ($query['stime']) { if (!is_numeric($query['stime'])) { $query['stime'] = PwStrtoTime($query['stime']); } $where[] = "stime>" . pwEscape($query['stime'], false); } $where = $where ? ' WHERE ' . implode(' AND ', $where) : ''; $page = getGP('page'); (!is_numeric($page) || $page < 1) && ($page = 1); $limit = pwLimit(($page - 1) * $db_perpage, $db_perpage); $count = $db->get_value("SELECT COUNT(*) FROM pw_pushdata WHERE {$where}"); $pages = numofpage($count, $page, ceil($count / $db_perpage), "{$basename}&query=" . base64_encode(serialize($query)) . '&'); $rs = $db->query("SELECT * FROM pw_pushdata {$where} ORDER BY id DESC {$limit}"); while ($rt = $db->fetch_array($rs)) { $pushdata[] = $rt; } include PrintEot('pushdata'); exit; } elseif ($action == 'repush') { InitGP(array('selid'), 'P'); if (!($selid = checkselid($selid))) { $basename = "javascript:history.go(-1);"; adminmsg('operate_error');
$name = getGP('name', 'P', 'array'); $date = get_date('Y-m-d H:i:s', PHP_TIME); foreach ($idarr as $id) { if ($name[$id] == '') { $name[$id] = '新文件夹名称'; } $document_type = array('title' => $name[$id]); update_db('document_type', $document_type, array('id' => $id)); } if (getGP('newid', 'P', 'array') != '' || getGP('newids', 'P', 'array') != '') { $newname = ''; foreach (getGP('newname', 'P', 'array') as $name) { $newname .= $name . ','; } $newinherited = ''; foreach (getGP('newinherited', 'P', 'array') as $name) { $newinherited .= $name . ','; } $newname = explode(',', substr($newname, 0, -1)); $newinherited = explode(',', substr($newinherited, 0, -1)); if ($newname != '') { for ($i = 0; $i < sizeof($newname); $i++) { if ($newname[$i] != '') { if ($newname[$i] == '') { $newname[$i] = '新文件夹名称'; } if ($newinherited[$i] != '') { $fatherid = $newinherited[$i]; } else { $fatherid = '0'; }
<?php (!defined('IN_TOA') || !defined('IN_ADMIN')) && exit('Access Denied!'); //if ( !is_superadmin() && !check_purview('manage_link') ) prompt('对不起,你没有权限执行本操作!'); //初始化信息,进入表单页面 empty($do) && ($do = 'list'); if ($do == 'edit') { $id = getGP('id', 'G', 'int'); $blog = $db->fetch_one_array("SELECT * FROM " . DB_TABLEPRE . "book WHERE id = '{$id}' "); include_once 'template/views.php'; } elseif ($do == 'save') { goto_page(getGP('dow', 'P')); } //读取部门 function GET_FILE_PUBLIC_LIST($fatherid = 0, $selid = 0, $layer = 0) { $str = ""; global $db; $query = $db->query("SELECT * FROM " . DB_TABLEPRE . "book_type where father='{$fatherid}' ORDER BY id Asc "); if (count($query) > 0) { for ($i = 0; $i < $layer; $i++) { $str .= "├"; } while ($row = $db->fetch_array($query)) { $selstr = $row['id'] == $selid ? 'selected="selected"' : ''; $htmlstr = '<option value="' . $row['id'] . '" ' . $selstr . '>' . $str . $row['title'] . '</option>'; echo $htmlstr; GET_FILE_PUBLIC_LIST($row['id'], $selid, $layer + 1, $type); } } return;
$datename = "registration_" . get_date('YmdHis', PHP_TIME); $outputFileName = 'data/excel/' . $datename . '.xls'; $content = array(); $archive = array("日期", "姓名", "退到/次", "早退/次", "总时长", "原因"); $content[] = $archive; $wheresql = ''; if ($user = getGP('user', 'P')) { $wheresql .= " AND name ='" . $user . "'"; } //时间 $vstartdate = getGP('vstartdate', 'P'); $venddate = getGP('venddate', 'P'); if ($vstartdate != '' && $venddate != '') { $wheresql .= " AND (date>='" . $vstartdate . "' and date<='" . $venddate . "')"; } $ischeck = getGP('ischeck', 'P'); if ($ischeck == '1') { $wheresql .= " AND date ='" . get_date('Y-m-d', PHP_TIME) . "' "; } if ($ischeck == '2') { $getdate = get_date('Y-m', PHP_TIME) . "-" . (get_date('d', PHP_TIME) - 1); $wheresql .= " AND date ='" . $getdate . "' "; } if ($ischeck == '3') { $wheresql .= " AND DATE_SUB(CURDATE(), INTERVAL 7 DAY)<=date(date) "; } if ($ischeck == '4') { $wheresql .= " AND DATE_SUB(CURDATE(),INTERVAL 1 MONTH)<=date(date) "; } if ($ischeck == '5') { $wheresql .= " AND DATE_SUB(CURDATE(),INTERVAL 6 MONTH)<=date(date) ";
$wheresql .= " AND title LIKE '%{$title}%' "; } if ($number = getGP('number', 'P')) { $wheresql .= " AND number='" . $number . "'"; } if ($typeid = getGP('typeid', 'P')) { $wheresql .= " AND typeid='" . $typeid . "'"; } if ($modid = getGP('modid', 'P')) { $wheresql .= " AND modid='" . $modid . "'"; } if ($projectid = getGP('projectid', 'P')) { $wheresql .= " AND projectid='" . $projectid . "'"; } $vstartdate = getGP('vstartdate', 'P'); $venddate = getGP('venddate', 'P'); if ($vstartdate != '' && $venddate != '') { $wheresql .= " AND (date>='" . $vstartdate . "' and date<='" . $venddate . "')"; } //获取表单 $archive = array(); $inputname = array(); $sql = "SELECT * FROM " . DB_TABLEPRE . "project_from where typeid='" . $typeid . "' and formtype='2' and tplid='" . $modid . "' and inputtype!=6 ORDER BY fromid Asc"; $query = $db->query($sql); $archive[] = "<b>流水单号</b>"; $archive[] = "<b>" . $mod['modname'] . "名称</b>"; $num = 0; while ($row = $db->fetch_array($query)) { $num++; $archive[] = "<b>" . $row['fromname'] . "</b>"; $inputname[] = $row['inputname'];
$wage_basis = array('username' => $username[$id], 'name' => $name[$id], 'content' => $content[$id]); update_db('wage_basis', $wage_basis, array('bid' => $id)); } //$sqlu = "SELECT tid,name FROM ".DB_TABLEPRE."wage_type order by tnumber asc"; //$results = $db->query($sqlu); //while ($type = $db->fetch_array($results)) { foreach ($_CACHE['wage_type'] as $type) { $contentdb = getGP('type_' . $type['tid'], 'P', 'array'); $wdb = $db->fetch_one_array("SELECT did FROM " . DB_TABLEPRE . "wage_data WHERE type=1 and viewid='" . $id . "' and tid='" . $type['tid'] . "'"); if ($wdb['did'] != '') { $wage_data = array('content' => $contentdb[$id]); update_db('wage_data', $wage_data, array('viewid' => $id, 'tid' => $type['tid'], 'type' => 1)); } else { $wage_data = array('viewid' => $id, 'tid' => $type['tid'], 'name' => $type['name'], 'content' => $contentdb[$id], 'type' => 1); insert_db('wage_data', $wage_data); } } } show_msg('薪资基础信息操作成功!', 'admin.php?ac=' . $ac . '&fileurl=' . $fileurl . ''); } elseif (getGP('id', 'G') != '') { $db->query("DELETE FROM " . DB_TABLEPRE . "wage_type WHERE tid = '" . getGP('id', 'G') . "' "); $content = getGP('id', 'G'); $title = '删除薪资项目'; get_logadd(getGP('id', 'G'), $content, $title, 36, $_USER->id); show_msg('薪资项目删除成功!', 'admin.php?ac=' . $ac . '&fileurl=' . $fileurl . ''); } else { $sql = "SELECT a.*,b.name FROM " . DB_TABLEPRE . "user a," . DB_TABLEPRE . "user_view b where a.ischeck!=0 and a.id!=1 and a.id=b.uid ORDER BY a.numbers asc"; $result = $db->fetch_all($sql); include_once 'template/basis.php'; } }
} elseif ($_GET["type1"] == '8') { $human_form_type = '复职管理'; } elseif ($_GET["type1"] == '9') { $human_form_type = '职称评定'; } elseif ($_GET["type1"] == '10') { $human_form_type = '员工关怀'; } else { $human_form_type = ''; } empty($do) && ($do = 'list'); if ($do == 'list') { //列表信息 $wheresql = ''; $page = max(1, getGP('page', 'G', 'int')); $pagesize = $_CONFIG->config_data('pagenum'); $offset = ($page - 1) * $pagesize; $url = 'admin.php?ac=human_form&fileurl=human&type1=' . $_GET["type1"] . ''; $num = $db->result("SELECT COUNT(*) AS num FROM " . DB_TABLEPRE . "human_form WHERE type1='" . trim($_GET["type1"]) . "' "); $sql = "SELECT * FROM " . DB_TABLEPRE . "human_form WHERE type1='" . trim($_GET["type1"]) . "' ORDER BY id asc LIMIT {$offset}, {$pagesize}"; $result = $db->fetch_all($sql); include_once 'template/human_form.php'; } elseif ($do == '删 除') { $idarr = getGP('id', 'P', 'array'); foreach ($idarr as $id) { $db->query("DELETE FROM " . DB_TABLEPRE . "human_form WHERE id = '{$id}' "); } $content = serialize($idarr); $title = '删除CRM表单'; get_logadd($id, $content, $title, 37, $_USER->id); show_msg('删除CRM表单成功!', 'admin.php?ac=human_form&fileurl=human&type1=' . $_GET["type1"] . ''); }
<?php (!defined('IN_TOA') || !defined('IN_ADMIN')) && exit('Access Denied!'); get_key("property_depreciation"); empty($do) && ($do = 'list'); if ($do == 'edit') { //列表信息 $id = getGP('id', 'G', 'int'); $sql = "SELECT * FROM " . DB_TABLEPRE . "property_depreciation WHERE propertyid='" . $id . "' ORDER BY id desc"; $result = $db->fetch_all($sql); include_once 'template/depreciation_view.php'; }
} $newname = '515158'; foreach (getGP('newname', 'P', 'array') as $name) { $newname .= ',,' . $name; } $newname = explode(',,', str_replace('515158,,', '', $newname)); if ($newname != '') { for ($i = 0; $i < sizeof($newname); $i++) { if (str_replace('515158', '', $newname[$i]) != '') { if (str_replace('515158', '', $newname[$i]) == '') { $newname[$i] = '新' . $_cname['name']; } $office_type = array('oname' => str_replace('515158', '', $newname[$i]), 'otype' => $otype, 'uid' => $_USER->id); insert_db('office_type', $office_type); } } } show_msg($_cname['name'] . '信息操作成功!', 'admin.php?ac=' . $ac . '&fileurl=' . $fileurl . '&do=bbsclass&otype=' . $otype); } elseif (getGP('id', 'G') != '') { $db->query("DELETE FROM " . DB_TABLEPRE . "office_type WHERE oid = '" . getGP('id', 'G') . "' "); /*$content=getGP('id','G').get_log(1).$_USER->id; $title='删除'.$_cname['name']; get_logadd(getGP('id','G'),$content,$title,30,$_USER->id);*/ //都写了日志,唯这个还没有写 show_msg($_cname['name'] . '信息删除成功!', 'admin.php?ac=' . $ac . '&fileurl=' . $fileurl . '&do=bbsclass&otype=' . $otype); } else { $sql = "SELECT * FROM " . DB_TABLEPRE . "office_type where otype='" . $otype . "' ORDER BY oid asc"; $result = $db->fetch_all($sql); include_once 'template/officeclass.php'; } }
$outputFileName = 'data/excel/' . $datename . '.xls'; //生成数据 $content = array(); $archive = array("主题", "用户", "内容", "操作时间", "类型"); $content[] = $archive; $wheresql = ''; //根据条件导出 if ($name = getGP('name', 'G')) { $wheresql .= " AND title LIKE '%{$name}%'"; } if ($type = getGP('type', 'G')) { $wheresql .= " AND type='" . $type . "'"; } //时间 $vstartdate = getGP('vstartdate', 'G'); $venddate = getGP('venddate', 'G'); if ($vstartdate != '' && $venddate != '') { $wheresql .= " AND (startdate>'" . $vstartdate . "' and startdate<'" . $venddate . "')"; } $sql = "SELECT * FROM " . DB_TABLEPRE . "oalog WHERE 1 {$wheresql} and uid='" . $_USER->id . "' ORDER BY id desc"; $result = $db->query($sql); while ($row = $db->fetch_array($result)) { $content = explode('|515158.com|', $row[content]); $contentdata = ""; for ($i = 0; $i < sizeof($content); $i++) { if ($content[$i] != '') { $contentdata = $contentdata . $content[$i]; } } $archive = array("" . $row[title] . "", "" . get_realname($row['uid']) . "", "" . $contentdata . "", "" . str_replace('-', '.', $row[startdate]) . "", "" . get_oalog_type($row['type']) . ""); $content[] = $archive;
$inputvalues .= $arrsave . ','; } $inputvalue = substr($inputvalues, 0, -1); } elseif ($row['inputtype'] == '2') { $inputvalue = trim(getGP('' . $row["inputname"] . '', 'P')); } else { $inputvalue = check_str(getGP('' . $row["inputname"] . '', 'P')); } $crm_db = array('content' => $inputvalue); //insert_db('crm_db',$crm_db); update_db('crm_db', $crm_db, array('viewid' => $vid, 'type' => 'crm_care', 'inputname' => $row["inputname"], 'formid' => $row["fid"])); $crm_log .= serialize($crm_db) . '|515158.com|'; } $content = serialize($crm_care); $title = get_realname($_USER->id) . '于' . get_date('Y-m-d H:i:s', PHP_TIME) . '编辑客户关怀信息'; get_logadd($vid, $content, $title, 36, $_USER->id); crm_log($title, $vid, $content, substr($crm_log, 0, -12), 1, 'crm_care'); show_msg('编辑客户关怀信息成功!', 'admin.php?ac=' . $ac . '&fileurl=' . $fileurl . '&type=' . getGP('type', 'P')); } else { $view = $db->fetch_one_array("SELECT * FROM " . DB_TABLEPRE . "crm_care WHERE id = '" . getGP('id', 'G', 'int') . "' "); if ($_GET['type'] == '2') { get_key("crm_care_edit_2"); } else { get_key("crm_care_edit_1"); } include_once 'company/care_edit.php'; } } elseif ($do == 'view') { $view = $db->fetch_one_array("SELECT * FROM " . DB_TABLEPRE . "crm_care WHERE id = '" . getGP('id', 'G', 'int') . "' "); include_once 'company/care_view.php'; }
$db->query("DELETE FROM " . DB_TABLEPRE . "sms_send WHERE id = '{$id}' "); //db->query("DELETE FROM ".DB_TABLEPRE."user_view WHERE uid = '$id'"); if ($id != '') { $oalog = array('uid' => $_USER->id, 'content' => '删除内部短信', 'title' => '删除内部短信', 'startdate' => get_date('Y-m-d H:i:s', PHP_TIME), 'contentid' => $id, 'type' => '4'); insert_db('oalog', $oalog); } } show_msg('短消息删除成功!', 'admin.php?ac=index&fileurl=sms&userkeytype=' . getGP('userkeytype', 'P') . ''); } elseif ($do == 'excel') { $datename = "sms_" . get_date('YmdHis', PHP_TIME); $outputFileName = 'data/excel/' . $datename . '.xls'; $content = array(); $archive = array("接收人", "发送人", "发送时间", "内容"); $content[] = $archive; $wheresql = ''; $vuidtype = getGP('vuidtype', 'P'); if (!is_superadmin() && $vuidtype == '') { $wheresql .= " AND uid ='" . $_USER->id . "'"; } if ($vuidtype != '') { if ($vuidtype == '-1') { $wheresql .= get_subordinate($_USER->id, 'uid'); } else { $wheresql .= " and uid='" . $vuidtype . "'"; } } $sql = "SELECT * FROM " . DB_TABLEPRE . "sms_send WHERE 1 {$wheresql} ORDER BY id desc"; $result = $db->query($sql); while ($row = $db->fetch_array($result)) { $archive = array("" . $row['receiveperson'] . "", "" . get_realname($row['uid']) . "", "" . str_replace("-", ".", $row[date]) . "", "" . $row['content'] . ""); $content[] = $archive;
<?php /* [Office 515158] (C) 2009-2012 天生创想 Inc. $Id: config_index.php 1209087 2012-01-08 08:58:28Z baiwei.jiang $ */ (!defined('IN_TOA') || !defined('IN_ADMIN')) && exit('Access Denied!'); get_key("config_inc"); empty($do) && ($do = 'list'); if ($do == 'list') { include_once 'template/config.php'; } elseif ($do == 'save') { get_key("config_inc"); $namearr = getGP('name', 'P', 'array'); $valuearr = getGP('value', 'P', 'array'); foreach ($namearr as $name) { if ($result = $db->fetch_one_array("SELECT * FROM " . DB_TABLEPRE . "config WHERE name = '" . $name . "' ")) { $config = array('value' => $valuearr[$name]); update_db('config', $config, array('name' => $name)); } else { $config = array('name' => $name, 'value' => $valuearr[$name]); insert_db('config', $config); } } $content = serialize($config); $title = '系统设置'; get_logadd(1, $content, $title, 1, $_USER->id); oa_mana_recache('config', 'name', 'id'); show_msg('配置信息更新成功!', 'admin.php?ac=' . $ac . '&fileurl=' . $fileurl . ''); }