Пример #1
0
<?php

/**********************************************************
* File         : delete_mlist.php
* Authors      : mie tsutsui
* Date         : 2013.01.10
* Last Update  : 2013.01.10
* Copyright    :
***********************************************************/
set_include_path('.:/usr/share/pear:/var/www/phplib');
require_once "mgr/common_mgr.class.php";
$dir = getcwd();
$oMgr = new common_mgr();
$client = null;
$oMgr->createMlistClient(&$client);
if (is_null($client)) {
    echo "client is null";
    exit;
}
$dir = getcwd();
$oMgr = new common_mgr();
$file = $argv[1];
$buff = file_get_contents($dir . "/" . $file);
$aryLines = explode("\n", $buff);
$csv = "";
if (is_array($aryLines)) {
    foreach ($aryLines as $line) {
        $line = trim($line);
        list($mlist_acc) = explode(",", $line);
        $params = array('listName' => $mlist_acc);
        $res = $client->mailingDelete($params);
Пример #2
0
<?php

set_include_path('.:/usr/share/pear:/var/www/phplib');
require_once "mgr/common_mgr.class.php";
$dir = getcwd();
require_once $dir . "/define.inc.php";
$oMgr = new common_mgr();
$sql = "select distinct UM.login_id,UM.kanjisei || ' ' || UM.kanjimei as kanjiname,UM.login_passwd,UM.kanasei || ' ' || UM.kanamei as kananame,UM.mail_acc || case when UM.mail_acc is not null then '@ncvc.go.jp' else '' end as mail_addr,PM.post_name || case when usp.sub_post_name is not null then '|' || usp.sub_post_name else '' end as post_name,JM.job_name || case when usj.sub_job_name is not null then '|' || usj.sub_job_name else '' end as job_name,UM.naisen,UM.pbno from user_mst as UM left outer join post_mst as PM on UM.post_id = PM.post_id and PM.del_flg = '0' left outer join (select um.user_id, array_to_string(array(select pm.post_name from user_sub_post_tbl as usp, post_mst as pm where usp.post_id = pm.post_id and pm.del_flg = '0' and usp.del_flg = '0' and usp.user_id = um.user_id), '|') as sub_post_name from user_sub_post_tbl as um where um.post_id is not null) as usp on UM.user_id = usp.user_id left outer join job_mst as JM on UM.job_id = JM.job_id and JM.del_flg = '0' left outer join (select um.user_id, array_to_string(array(select jm.job_name from user_sub_job_tbl as usj, job_mst as jm where usj.job_id = jm.job_id and jm.del_flg = '0' and usj.del_flg = '0' and usj.user_id = um.user_id), '|') as sub_job_name from user_sub_job_tbl as um where um.job_id is not null) as usj on UM.user_id = usj.user_id where UM.garoon_disused_flg != '1' and UM.login_id is not null and UM.login_id != '' and UM.start_date <= now()::date and COALESCE(UM.end_date, now()::date) >= now()::date and UM.belong_chg_id not in (408, 409)";
$aryRet = $oMgr->oDb->getAll($sql);
$csv = '"現ログイン名","名前","新ログイン名","パスワード","ロケール","拠点","表示優先度","使用/停止","削除フラグ","よみ","E-mail","メモ","役職","連絡先","職種","内線番号","PHS番号"';
$csv .= "\n";
if (is_array($aryRet)) {
    foreach ($aryRet as $data) {
        $passwd = $oMgr->passwordDecrypt($data['login_passwd']);
        if ($data['post_name'] == '一般') {
            $data['post_name'] = "";
        }
        $csv .= '"' . $data['login_id'] . '"';
        // 現ログイン名
        $csv .= ',"' . $data['kanjiname'] . '"';
        // 名前
        $csv .= ',"' . $data['login_id'] . '"';
        // 新ログイン名
        $csv .= ',"' . $passwd . '"';
        // パスワード
        $csv .= ',""';
        // ロケール
        $csv .= ',""';
        // 拠点
        $csv .= ',""';
        // 表示優先度
Пример #3
0
<?php

set_include_path('.:/usr/share/pear:/var/www/phplib');
require_once "mgr/common_mgr.class.php";
$oMgr = new common_mgr();
$pass = $argv[1];
$kanjiname = str_replace(" ", " ", "渋田 和芳");
print_r($kanjiname);
print_r(":");
$kanjiname = string::han2zen($kanjiname);
print_r($kanjiname);
print_r(":");
$strUser .= string::mb_str_pad($kanjiname, 20, " ");
print_r($strUser);
print_r(":");
$passwd = trim($pass, "\"");
$passwd = $oMgr->passwordDecrypt($passwd);
exit;
Пример #4
0
<?php

/**********************************************************
* File         : retry_auto_members.php
* Authors      : mie tsutsui
* Date         : 2013.01.10
* Last Update  : 2013.01.10
* Copyright    :
***********************************************************/
set_include_path('.:/usr/share/pear:/var/www/phplib');
require_once "mgr/common_mgr.class.php";
$oMgr = new common_mgr();
$sql = "\nSELECT\n    log_cd,\n    mlist_id\nFROM\n    mlist_members_errlog\nWHERE\n    complete_flg='0'\n";
$aryId = $oMgr->oDb->getAssoc2Ary($sql);
if (is_array($aryId)) {
    foreach ($aryId as $log_cd => $mlist_id) {
        $oMgr->relationAutoMembers($mlist_id);
        // 結果にかかわらず完了フラグ1を立てる
        $sql = "UPDATE mlist_members_errlog SET complete_flg = '1' WHERE log_cd = '" . $log_cd . "'";
        $oMgr->oDb->query($sql);
    }
}
exit;
    if ($aryOld['uid'] != $aryNew['uid']) {
        return true;
    }
    if ($aryOld['start_date'] != $aryNew['start_date']) {
        return true;
    }
    if ($aryOld['end_date'] != $aryNew['end_date']) {
        return true;
    }
    if ($aryOld['suspend_flg'] != $aryNew['suspend_flg']) {
        return true;
    }
    return false;
}
// 基本操作オブジェクト
$oMgr = new common_mgr();
//
// ファイルをチェック
//
if ($data = file_get_contents(CARD_KOJIN_DIR . "/save/SVKOJIN.csv")) {
    $data = mb_convert_encoding($data, "UTF-8", "SJIS, sjis-win");
    $aryData = explode("\n", $data);
    $cnt = 0;
    foreach ($aryData as $body) {
        $cnt++;
        if ($cnt == 1 || $cnt == 2) {
            // 1-2行目はヘッダ情報
            continue;
        }
        if (trim($body) == "") {
            continue;
Пример #6
0
 function __construct()
 {
     parent::__construct();
 }
<?php

/**********************************************************
* File         : retry_user_mail_delete.php
* Authors      : mie tsutsui
* Date         : 2013.01.10
* Last Update  : 2013.01.10
* Copyright    :
***********************************************************/
set_include_path('.:/usr/share/pear:/var/www/phplib');
require_once "mgr/common_mgr.class.php";
require_once "sql/common_sql.inc.php";
$oMgr = new common_mgr();
$sql = "\nSELECT\n    log_cd,\n    login_id\nFROM\n    user_mail_errlog\nWHERE\n    kbn = '9' AND\n    complete_flg='0'\n";
$aryId = $oMgr->oDb->getAssoc2Ary($sql);
if (is_array($aryId)) {
    foreach ($aryId as $log_cd => $login_id) {
        // 結果にかかわらず完了フラグ1を立てる
        $sql = "UPDATE mlist_members_errlog SET complete_flg = '1' WHERE log_cd = '" . $log_cd . "'";
        $oMgr->oDb->query($sql);
        $oMgr->delUserMailAddr($login_id);
    }
}
exit;
    if ($aryOld['uid'] != $aryNew['uid']) {
        return true;
    }
    if ($aryOld['start_date'] != $aryNew['start_date']) {
        return true;
    }
    if ($aryOld['end_date'] != $aryNew['end_date']) {
        return true;
    }
    if ($aryOld['suspend_flg'] != $aryNew['suspend_flg']) {
        return true;
    }
    return false;
}
// 基本操作オブジェクト
$oMgr = new common_mgr();
//
// ファイルをチェック
//
if ($data = file_get_contents(CARD_KOJIN_DIR . "/save/SVKOJIN.csv")) {
    $data = mb_convert_encoding($data, "UTF-8", "SJIS, sjis-win");
    $aryData = explode("\n", $data);
    $cnt = 0;
    foreach ($aryData as $body) {
        $cnt++;
        if ($cnt == 1 || $cnt == 2) {
            // 1-2行目はヘッダ情報
            continue;
        }
        if (trim($body) == "") {
            continue;
Пример #9
0
<?php

set_include_path('.:/usr/share/pear:/var/www/phplib');
require_once "mgr/common_mgr.class.php";
$dir = getcwd();
$oMgr = new common_mgr();
$cnt = $argv[1];
$csv = "";
for ($i = 0; $i < $cnt; $i++) {
    $src_pwd = $oMgr->createPassword();
    $pwd = $oMgr->passwordEncrypt($src_pwd);
    $csv .= $i . "," . $pwd . "," . $src_pwd . "\n";
}
if ($csv != "") {
    file_put_contents($dir . "/passwd.csv", $csv);
}
exit;
Пример #10
0
<?php

/**********************************************************
* File         : passwd_encrypt.php
* Authors      : mie tsutsui
* Date         : 2013.01.10
* Last Update  : 2013.01.10
* Copyright    :
***********************************************************/
exit;
set_include_path('.:/usr/share/pear:/var/www/phplib');
require_once "mgr/common_mgr.class.php";
$oMgr = new common_mgr();
$oMgr->oDb->begin();
$sql = "SELECT user_id, login_passwd FROM user_mst WHERE login_passwd != ''";
$aryPw = $oMgr->oDb->getAssoc2Ary($sql);
if (is_array($aryPw)) {
    foreach ($aryPw as $user_id => $passwd) {
        $passwd = $oMgr->passwordEncrypt($passwd);
        $sql = "UPDATE user_mst SET login_passwd = '" . string::replaceSql($passwd) . "' WHERE user_id = " . $user_id;
        $ret = $oMgr->oDb->query($sql);
        if (!$ret) {
            echo $sql;
            $oMgr->oDb->rollback();
            exit;
        }
    }
}
$sql = "SELECT user_id, list_no, password FROM user_his_tbl WHERE password != ''";
$aryHis = $oMgr->oDb->getAll($sql);
if (is_array($aryHis)) {
Пример #11
0
<?php

/**********************************************************
* File         : retry_user_mail_edit.php
* Authors      : mie tsutsui
* Date         : 2013.01.10
* Last Update  : 2013.01.10
* Copyright    :
***********************************************************/
set_include_path('.:/usr/share/pear:/var/www/phplib');
require_once "mgr/common_mgr.class.php";
require_once "sql/common_sql.inc.php";
$oMgr = new common_mgr();
$sql = "\nSELECT\n    log_cd,\n    user_id,\n    login_id\nFROM\n    user_mail_errlog\nWHERE\n    kbn = '1' AND\n    complete_flg='0'\n";
$aryId = $oMgr->oDb->getAssoc($sql);
if (is_array($aryId)) {
    foreach ($aryId as $log_cd => $aryData) {
        // 結果にかかわらず完了フラグ1を立てる
        $sql = "UPDATE mlist_members_errlog SET complete_flg = '1' WHERE log_cd = '" . $log_cd . "'";
        $oMgr->oDb->query($sql);
        $user_id = $aryData['user_id'];
        $login_id = $aryData['login_id'];
        // 統合IDが変わっていないか確認
        $aryUser = $oMgr->getUserData($user_id);
        // 変わっていたら処理しない
        if ($login_id != $aryUser['login_id']) {
            continue;
        }
        $oMgr->relationUserMailAddr("", $user_id);
    }
}