Exemplo n.º 1
0
function add_task($file, $code)
{
    $qry = "SELECT * FROM office_task WHERE TASK_CODE='{$code}'";
    $csr = exequery(TD::conn(), $qry);
    if ($row = mysql_fetch_array($csr)) {
    } else {
        $qry = "INSERT INTO `office_task` (`TASK_TYPE`, `INTERVAL`, `EXEC_TIME`, `LAST_EXEC`,\n\t\t\t\t`EXEC_FLAG`, `EXEC_MSG`, `TASK_URL`, `TASK_NAME`, `TASK_DESC`, `TASK_CODE`, `USE_FLAG`,\n\t\t\t\t`SYS_TASK`, `EXT_DATA`) VALUES(\n\t\t\t\t'0',\n\t\t\t\t1,\n\t\t\t\t'00:00:00',\n\t\t\t\t'0000-00-00 00:00:00',\n\t\t\t\t1,\n\t\t\t\t'0000-00-00 00:00:00',\n\t\t\t\t'{$file}',\n\t\t\t\t'即时通讯离线消息推送',\n\t\t\t\t'定时将OA精灵离线消息推送到微信企业号',\n\t\t\t\t'{$code}',\n\t\t\t\t'1',\n\t\t\t\t'0',\n\t\t\t\t'')";
        exequery(TD::conn(), $qry);
        //Add system parameter
        include_once "inc/utility_all.php";
        add_sys_para(array("WEIXINQY_MSGCHECK_TIME" => ""));
    }
}
Exemplo n.º 2
0
        $WEIXINQY_CORPID = htmlspecialchars($_POST['WEIXINQY_CORPID']);
        $WEIXINQY_SECRET = htmlspecialchars($_POST['WEIXINQY_SECRET']);
        set_sys_para(array("WEIXINQY_SECRET" => "{$WEIXINQY_SECRET}", "WEIXINQY_CORPID" => "{$WEIXINQY_CORPID}"));
        include_once "inc/utility_cache.php";
        $WEIXINQY_TOKENS = TD::get_cache("WEIXINQY_TOKENS");
        if ($WEIXINQY_TOKENS !== FALSE) {
            TD::set_cache("WEIXINQY_TOKENS", NULL);
        }
    }
}
include_once "inc/conn.php";
include_once "inc/utility_update.php";
if (!field_exists("DEPARTMENT", "WEIXIN_DEPT_ID")) {
    $query = "ALTER TABLE `department` ADD COLUMN `WEIXIN_DEPT_ID`  int(11) NOT NULL DEFAULT 0 AFTER `DEPT_EMAIL_AUDITS_IDS`";
    exequery(TD::conn(), $query, TRUE);
    add_sys_para(array("WEIXINQY_SECRET" => "", "WEIXINQY_CORPID" => "", "WEIXINQY_OAURL" => "", "WEIXINQY_APP_SMS" => ""));
    cache_sys_para();
}
$PARA_ARRAY = get_sys_para("WEIXINQY_CORPID,WEIXINQY_SECRET,WEIXINQY_OAURL");
$WEIXINQY_CORPID = $PARA_ARRAY['WEIXINQY_CORPID'];
$WEIXINQY_SECRET = $PARA_ARRAY['WEIXINQY_SECRET'];
$WEIXINQY_OAURL = $PARA_ARRAY['WEIXINQY_OAURL'];
echo "<body>\r\n<link rel=\"stylesheet\" type=\"text/css\" href=\"";
echo MYOA_JS_SERVER;
echo "/static/js/bootstrap/css/bootstrap.css\">\r\n<link rel=\"stylesheet\" type=\"text/css\" href=\"";
echo MYOA_JS_SERVER;
echo "/static/modules/weixinqy/style.css\">\r\n<script type=\"text/javascript\" src=\"";
echo MYOA_JS_SERVER;
echo "/static/js/jquery-1.10.2/jquery.min.js";
echo $GZIP_POSTFIX;
echo "\"></script>\r\n<script type=\"text/javascript\">\r\n\$(function(){\r\n    \$(\"#connect-btn\").click(function(){\r\n        \$.get(\"setting.php\", {action: \"connect\", time: new Date().getTime()}, function(msg){\r\n            if(msg == \"ok\"){\r\n                \$(\"#connect-msg\").addClass(\"text-success\").html(\"";