Example #1
0
function workbench_registadd($rid, $hour, $number, $type)
{
    global $_USER;
    $registration_log = array('rid' => $rid, 'hour' => $hour, 'number' => $number, 'type' => $type);
    insert_db('registration_log', $registration_log);
    return;
}
Example #2
0
 public function config_user()
 {
     global $db;
     $user = array('username' => 'CRMUSER', 'password' => '96e79218965eb72c92a549dd5a330112', 'groupid' => '1', 'ischeck' => '1');
     insert_db('user', $user);
     $id = $db->insert_id();
     $user_view = array('name' => 'CRMUSER');
     insert_db('user_view', $user_view);
 }
Example #3
0
 function news_comment_record($News)
 {
     if (verif_connect(true)) {
         if (verifier_token(600, get_link('Comments', 'Public'), 'Comment-' . $News['News_ID'])) {
             if (request_confirm('End_Add')) {
                 if (request_confirm('Comment_Message')) {
                     insert_db('Caranille_Comments', addslashes_r($_POST));
                 }
             }
         }
     }
 }
Example #4
0
function register_request()
{
    global $prefixe_salt, $suffixe_salt;
    extract(addslashes_r(stripslashes_r($_POST)));
    $Date = date('Y-m-d H:i:s');
    $IP = getRealIpAddr();
    $filter = uniqid();
    $pswd = password_encode($prefixe_salt . $filter . $suffixe_salt, $Password);
    $key = uniqid();
    insert_db('Caranille_Accounts', array('Account_Pseudo' => strip_tags($Pseudo), 'Account_Password' => strip_tags($pswd), 'Account_Salt' => $filter, 'Account_Email' => $Email, 'Account_Sexe' => $Sexe, 'Account_Inscription' => $Date, 'Account_Last_IP' => $IP, 'Account_HP_Remaining' => 100, 'Account_Key' => $key, 'Account_valid' => 0, 'Account_Level' => 1, 'Account_Order' => 1, 'Account_Reason' => 'None', 'Account_Status' => "Authorized", 'Account_Access' => "Member", 'Account_Guild_ID' => 0, 'Account_HP_Bonus' => 0, 'Account_MP_Remaining' => 10, 'Account_MP_Bonus' => 0, 'Account_Strength_Bonus' => 0, 'Account_Magic_Bonus' => 0, 'Account_Agility_Bonus' => 0, 'Account_Defense_Bonus' => 0, 'Account_Experience' => 0, 'Account_Golds' => 0, 'Account_Notoriety' => 0, 'Account_Chapter' => 1, 'Account_Mission' => 1, 'Account_Step' => 2));
    $user_record = get_db('request_account', $_POST);
    return $user_record;
}
Example #5
0
function PHONE_ADD_POST($person = 0, $content = 0, $receiveperson = 0, $type = 0, $url = 0, $userid = 0)
{
    //判断当前可用通道
    global $db;
    $blog = $db->fetch_one_array("SELECT * FROM " . DB_TABLEPRE . "phone_channel where id=1 and pkey='1' and (type='2' or type='3') order by id desc");
    //获取账户信息
    $username = $blog["username"];
    $password = $blog["password"];
    //获取接口信息
    $connection = explode('#515158#', $blog["connection"]);
    $personfor = explode(',', $person);
    $receivepersonfor = explode(',', $receiveperson);
    //$ef='';
    for ($i = 0; $i < sizeof($personfor); $i++) {
        if ($personfor[$i] != '') {
            $date = get_date('y-m-d H:i:s', PHP_TIME);
            $sms_add = explode('#01', $connection[2]);
            $ugcode_vod = new ugcode();
            $contentgdb2312 = $ugcode_vod->ugcode_vod(1, $content);
            $phoneurl = $sms_add[0] . trim($username) . $sms_add[1] . trim($password) . $sms_add[2] . trim($personfor[$i]) . $sms_add[3] . trim($contentgdb2312) . $sms_add[4] . $sms_add[5];
            $res = Utility::HttpRequest($phoneurl);
            if ($blog["connectionid"] == '1') {
                $res_sms = explode('/', $res);
                if ($res_sms[0] == '000') {
                    $type = '1';
                } else {
                    $type = '2';
                }
            } else {
                $res_sms = explode('&', $res);
                if ($res_sms[0] == 'result=0') {
                    $type = '1';
                } else {
                    $type = '2';
                }
            }
            //数据入库
            $phone_send = array('content' => $content, 'receivephone' => $personfor[$i], 'sendperson' => $userid, 'receiveperson' => $receivepersonfor[$i], 'date' => get_date('y-m-d H:i:s', PHP_TIME), 'type' => $type, 'channelid' => $blog["id"]);
            insert_db('phone_send', $phone_send);
            sleep(1);
        }
    }
}
Example #6
0
function get_data($num, $url)
{
    $str = file_get_contents($url);
    $str = trim($str);
    $str = strtolower($str);
    if ($str == '') {
        $str = file_get_contents($url);
    }
    if ($str == '') {
        // recode error
        $fp = fopen('cantdown_' . $num, 'a+');
        fputs($fp, $num . '\\r\\n');
        fclose($fp);
    } else {
        $data = parse_html($str);
        if (insert_db($num, $data)) {
            echo $num . "is ok \r\n";
        }
    }
}
Example #7
0
            $wheresql .= " and uid='" . $vuidtype . "'";
        }
    }
    $num = $db->result("SELECT COUNT(*) AS num FROM " . DB_TABLEPRE . "sms_send WHERE 1 {$wheresql} ");
    $sql = "SELECT * FROM " . DB_TABLEPRE . "sms_send WHERE 1 {$wheresql} ORDER BY id desc LIMIT {$offset}, {$pagesize}";
    $result = $db->fetch_all($sql);
    include_once 'template/index.php';
} elseif ($do == 'update') {
    get_key("office_info_delete");
    $idarr = getGP('id', 'P', 'array');
    foreach ($idarr as $id) {
        $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 != '') {
Example #8
0
    copy($tempfile, $newfile);
    $imgfold = $thispath . "/img";
    mkdir($imgfold, 0777);
    /*$test = "company/test";
    	$newtest = $tempMain."/test";
    	full_copy($test,$newtest);*/
}
//-------------------------- Check Interface Data
$sql_chk_interface = "select count(interfaceId) as totaldata from garageinterface where garageId = '" . $u_garage . "'";
$rs_chk_interface = mysql_query($sql_chk_interface);
$data_chk_interface = mysql_fetch_object($rs_chk_interface);
$chk_rowdata = $data_chk_interface->totaldata;
if ($chk_rowdata == 0) {
    $Table_Name = 'garageinterface';
    $data = array('interfaceLogo' => 'logo.png', 'interfaceBanner' => 'banner.jpg', 'interfaceFacebook' => 'https://www.facebook.com/', 'interfaceTwitter' => 'https://twitter.com/', 'interfaceGoogle' => 'https://plus.google.com/', 'garageId' => $u_garage);
    $sql = insert_db($Table_Name, $data);
    mysql_query($sql);
}
//-------------------------- Call Interface Data
$sql_interface = "select * from garageinterface where garageId = '" . $u_garage . "'";
$rs_interface = mysql_query($sql_interface);
$data_interface = mysql_fetch_object($rs_interface);
$interfaceLogo = $data_interface->interfaceLogo;
$interfaceBanner = $data_interface->interfaceBanner;
$interfaceFacebook = $data_interface->interfaceFacebook;
$interfaceTwitter = $data_interface->interfaceTwitter;
$interfaceGoogle = $data_interface->interfaceGoogle;
$garageAbout = $data_interface->garageAbout;
//-------------------------- Check Logo
$chk_logo = 0;
$pathLogo = $upload_dir . $interfaceLogo;
Example #9
0
    }
    if (getGP('tpladmin', 'P') != '') {
        $tpladmin = getGP('tpladmin', 'P');
    } else {
        $tpladmin = '0';
    }
    $uid = $_USER->id;
    if (getGP('tpladdr', 'P') != '') {
        $tpladdr = getGP('tpladdr', 'P');
    } else {
        $tpladdr = Pinyin($title) . '.php';
    }
    //主表信息
    $workclass_template = array('title' => $title, 'typeid' => $typeid, 'tplkey' => $tplkey, 'tpltype' => $tpltype, 'tpluser' => $tpluser, 'tpladmin' => $tpladmin, 'uid' => $uid, 'tpladdr' => $tpladdr);
    //写入主表信息
    insert_db('workclass_template', $workclass_template);
    $id = $db->insert_id();
    $content = serialize($workclass_template);
    $title = '添加工作流模型';
    get_logadd($id, $content, $title, 35, $_USER->id);
    show_msg('工作流模型添加成功!', 'admin.php?ac=' . $ac . '&fileurl=' . $fileurl . '');
} elseif ($do == 'edit') {
    $tplid = getGP('tplid', 'G', 'int');
    $blog = $db->fetch_one_array("SELECT * FROM " . DB_TABLEPRE . "workclass_template  WHERE tplid = '{$tplid}'");
    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') != '') {
Example #10
0
/*
	[Office 515158] (C) 2009-2012 天生创想 Inc.
	$Id: user_count.php 1209087 2012-01-08 08:58:28Z baiwei.jiang $
*/
define('IN_ADMIN', True);
require_once '../include/common.php';
get_login($_USER->id);
//更新在线数据到数据库中
$blog = $db->fetch_one_array("SELECT * FROM " . DB_TABLEPRE . "online where uid='" . $_USER->id . "'  ");
if ($blog["uid"] != '') {
    $online = array('startdate' => get_date('Y-m-d H:i:s', PHP_TIME), 'enddate' => get_date('Y-m-d H:i:s', PHP_TIME + 600));
    update_db('online', $online, array('uid' => $_USER->id));
} else {
    $online = array('uid' => $_USER->id, 'startdate' => get_date('Y-m-d H:i:s', PHP_TIME), 'enddate' => get_date('Y-m-d H:i:s', PHP_TIME + 600));
    insert_db('online', $online);
}
//更新在线状态
global $db;
$query = $db->query("SELECT * FROM " . DB_TABLEPRE . "online   order by id desc");
while ($row = $db->fetch_array($query)) {
    $uid = $row['uid'];
    if ($row["enddate"] >= get_date('Y-m-d H:i:s', PHP_TIME)) {
        $user = array('online' => 1);
        update_db('user', $user, array('id' => $uid));
    } else {
        $user = array('online' => 0);
        update_db('user', $user, array('id' => $uid));
    }
}
//更新数据后取出当前总在线人数
Example #11
0
         $content = '';
         $content = serialize($registration);
         $title = '编辑考勤信息';
         get_logadd($id, $content, $title, 7, $_USER->id);
     } else {
         $name = check_str(getGP('user', 'P'));
         $uid = check_str(getGP('userid', 'P'));
         $startdate = getGP('startdate', 'P') . " " . getGP('starth', 'P') . ":" . getGP('starti', 'P') . ":00";
         $enddate = getGP('enddate', 'P') . " " . getGP('endh', 'P') . ":" . getGP('endi', 'P') . ":00";
         $startnote = check_str(getGP('startnote', 'P'));
         $endnote = check_str(getGP('endnote', 'P'));
         $date = check_str(getGP('date', 'P'));
         $startyype = check_str(getGP('startyype', 'P'));
         $endtype = check_str(getGP('endtype', 'P'));
         $registration = array('name' => $name, 'startdate' => $startdate, 'enddate' => $enddate, 'startnote' => $startnote, 'endnote' => $endnote, 'uid' => $uid, 'startyype' => $startyype, 'endtype' => $endtype, 'date' => $date);
         insert_db('registration', $registration);
         $id = $db->insert_id();
         $content = serialize($registration);
         $title = '录入考勤信息';
         get_logadd($id, $content, $title, 7, $_USER->id);
     }
     show_msg('考勤信息操作成功!', 'admin.php?ac=' . $ac . '&fileurl=' . $fileurl . '');
 } else {
     $id = getGP('id', 'G', 'int');
     if ($id != '') {
         $user = $db->fetch_one_array("SELECT * FROM " . DB_TABLEPRE . "registration  WHERE id = '{$id}'  ");
         $startdate = explode(' ', $user['startdate']);
         $starttime = explode(':', $startdate[1]);
         $enddate = explode(' ', $user['enddate']);
         $endtime = explode(':', $enddate[1]);
         $_title['name'] = '更改';
Example #12
0
            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';
                        }
                        $document_type = array('title' => $newname[$i], 'father' => $fatherid, 'date' => $date, 'type' => $_GET['type'], 'uid' => $_USER->id);
                        insert_db('document_type', $document_type);
                    }
                }
            }
            $str = ',新增了<font color=red>' . sizeof($newname) . '</font>条信息';
        }
        show_msg('批量文件夹信息更新成功' . $str . '!', 'admin.php?ac=' . $ac . '&fileurl=' . $fileurl . '&do=documenttype&type=' . $_GET['type'] . '');
    } elseif ($_GET['view'] == 'typeupdate') {
        $db->query("DELETE FROM " . DB_TABLEPRE . "document_type WHERE id = '" . $_GET[id] . "'  ");
        $db->query("UPDATE " . DB_TABLEPRE . "document_type set father='" . $_GET['fid'] . "' WHERE father = '" . $_GET[id] . "'  ");
        show_msg('文件夹信息删除成功!', 'admin.php?ac=' . $ac . '&fileurl=' . $fileurl . '&do=documenttype&type=' . $_GET['type'] . '');
    }
    include_once 'template/documenttype.php';
}
Example #13
0
         $office_type = array('oname' => $name[$id]);
         update_db('office_type', $office_type, array('oid' => $id));
     }
     $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';
Example #14
0
        $Agility = 10;
        $Defense = 10;
        do {
            update_db('Caranille_Levels', array('Level_ID' => $Level, 'Level_Number' => $Level, 'Level_Experience_Required' => $Experience, 'Level_HP' => $HP, 'Level_MP' => $MP, 'Level_Strength' => $Strength, 'Level_Magic' => $Magic, 'Level_Agility' => $Agility, 'Level_Defense' => $Defense));
            $HP += $_POST['HP_Level'];
            $MP += $_POST['MP_Level'];
            $Strength += $_POST['Strength_Level'];
            $Magic += $_POST['Magic_Level'];
            $Agility += $_POST['Agility_Level'];
            $Defense += $_POST['Defense_Level'];
            $Experience += $_POST['Experience_Level'];
            $Level++;
        } while ($Level <= $max['Level_Number']);
        update_db('Caranille_Configuration', array('Configuration_Name' => 'curve-Experience', 'Configuration_Value' => $_POST['Experience_Level']));
        foreach ($array_character_type as $type) {
            update_db('Caranille_Configuration', array('Configuration_Name' => 'curve-' . $type, 'Configuration_Value' => $_POST[$type . '_Level']));
        }
    }
    if (request_confirm('Delete')) {
        delete_db('Caranille_Levels', $_POST);
        $message = 'Le niveau a bien été supprimée';
    }
    if (request_confirm('End_Add')) {
        if (valid_post_db('Caranille_Levels')) {
            insert_db('Caranille_Levels', addslashes_r($_POST));
            $message = 'niveau ajouté';
        } else {
            $message = 'Tous les champs n\'ont pas été remplis';
        }
    }
}
Example #15
0
<?php

if (verif_connect()) {
    load_css('guild.css', 'guild');
    if (has_guild()) {
        if (has_guild_acces('recrutement')) {
            if (request_confirm('guild-engage') || request_confirm('guild-refuse')) {
                if (verifier_token(60, get_link('Recrutement', 'Guild'), 'guild-candidat-' . $_POST['Account_ID'])) {
                    $Account_Query = get_db("candidat_guild_confirm", array('Guild_ID' => guild_data('Guild_ID'), 'Account_ID' => request_post('Account_ID')));
                    if (!empty($Account_Query)) {
                        if (request_confirm('guild-engage')) {
                            update_db('Caranille_Accounts', stripslashes_r($_POST));
                            $message = "Vous avez été accepté dans la guilde " . guild_data('Guild_Name') . ".";
                        } else {
                            update_db('Caranille_Accounts', array('Account_ID' => $Account_Query['Account_ID'], 'Account_Guild_ID' => 0, 'Account_Guild_Accept' => 0));
                            $message = "Votre candidature dans la guilde " . guild_data('Guild_Name') . " a été refusé.";
                        }
                        add_diary($message, $Account_Query['Account_ID']);
                        insert_db('Caranille_Private_Messages', array('Private_Message_Transmitter' => logged_data('Account_ID'), 'Private_Message_Receiver' => $Account_Query['Account_Pseudo'], 'Private_Message_Subject' => "Votre candidature dans la guilde " . guild_data('Guild_Name'), 'Private_Message_Message' => $message, 'Private_Message_Conversation' => null));
                    }
                }
            }
        }
    }
}
Example #16
0
         $startdate = getGP('startdate', 'P');
         $enddate = getGP('enddate', 'P');
         $price = getGP('price', 'P');
         $examination = check_str(getGP('examination', 'P'));
         $department = check_str(getGP('department', 'P'));
         $user = getGP('user', 'P');
         $organizationinfo = check_str(getGP('organizationinfo', 'P'));
         $contactperson = check_str(getGP('contactperson', 'P'));
         $request = check_str(getGP('request', 'P'));
         $appendix = getGP('appendix', 'P');
         $content = getGP('content', 'P');
         $uid = $_USER->id;
         $date = get_date('Y-m-d H:i:s', PHP_TIME);
         $training = array('number' => $number, 'name' => $name, 'channel' => $channel, 'trform' => $trform, 'sponsor' => $sponsor, 'responsible' => $responsible, 'participation' => $participation, 'address' => $address, 'organization' => $organization, 'orgperson' => $orgperson, 'curriculum' => $curriculum, 'classhour' => $classhour, 'startdate' => $startdate, 'enddate' => $enddate, 'price' => $price, 'examination' => $examination, 'department' => $department, 'user' => $user, 'organizationinfo' => $organizationinfo, 'contactperson' => $contactperson, 'request' => $request, 'appendix' => $appendix, 'content' => $content, 'uid' => $uid, 'type' => 1, 'date' => $date);
         //写入主表信息
         insert_db('training', $training);
         $id = $db->insert_id();
         $content = serialize($training);
         $title = '添加培训计划';
         get_logadd($id, $content, $title, 28, $_USER->id);
     }
     show_msg('培训计划信息操作成功!', 'admin.php?ac=' . $ac . '&fileurl=' . $fileurl . '');
 } else {
     $id = getGP('id', 'G', 'int');
     if ($id != '') {
         $user = $db->fetch_one_array("SELECT * FROM " . DB_TABLEPRE . "training  WHERE id = '{$id}'  ");
         get_key("training_");
         $_title['name'] = '编辑';
     } else {
         get_key("training_");
         $user['number'] = get_date('YmdHis', PHP_TIME);
Example #17
0
(!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 . '');
}
Example #18
0
     $query = $db->query("SELECT * FROM " . DB_TABLEPRE . "crm_form where type1='crm_care' ORDER BY inputnumber Asc");
     while ($row = $db->fetch_array($query)) {
         if ($row['inputtype'] == '4') {
             $inputvalues = '';
             $inputvalue = getGP('' . $row["inputname"] . '', 'P', 'array');
             foreach ($inputvalue as $arrsave) {
                 $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('inputname' => $row["inputname"], 'content' => $inputvalue, 'viewid' => $vid, 'formid' => $row["fid"], 'type' => 'crm_care');
         insert_db('crm_db', $crm_db);
         $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=' . $type);
 } else {
     if ($_GET['type'] == '2') {
         get_key("crm_care_add_2");
     } else {
         get_key("crm_care_add_1");
     }
     include_once 'company/care_add.php';
 }
Example #19
0
if ($do == 'list') {
    include_once 'template/add.php';
} elseif ($do == 'save') {
    $savetype = getGP('savetype', 'P');
    $goods_type = getGP('goods_type', 'P');
    $title = getGP('title', 'P');
    $specification = getGP('specification', 'P');
    $unit = getGP('unit', 'P');
    $price = getGP('price', 'P');
    $number = getGP('number', 'P');
    $content = getGP('content', 'P');
    //$purchase=getGP('purchase','P');
    //$examination=getGP('examination','P');
    //$warehousing=getGP('warehousing','P');
    $office_goods = array('goods_type' => $goods_type, 'title' => $title, 'specification' => $specification, 'unit' => $unit, 'price' => $price, 'number' => $number, 'content' => $content, 'date' => get_date('Y-m-d H:i:s', PHP_TIME), 'uid' => $_USER->id);
    insert_db('office_goods', $office_goods);
    $id = $db->insert_id();
    $content = serialize($office_goods);
    $title = '新增办公用品信息';
    get_logadd($id, $content, $title, 23, $_USER->id);
    show_msg('您要处理的信息操作成功!', 'admin.php?ac=index&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++) {
            $str .= "├";
Example #20
0
        }
        include_once 'template/planadd.php';
    }
} elseif ($do == 'views') {
    $id = getGP('id', 'G', 'int');
    if ($_POST['view'] != '') {
        $bbsid = getGP('bbsid', 'P');
        $title = check_str(getGP('title', 'P'));
        $author = getGP('author', 'P');
        $content = getGP('content', 'P');
        $type = getGP('type', 'P');
        $enddate = get_date('Y-m-d H:i:s', PHP_TIME);
        $uid = $_USER->id;
        //主表信息
        $bbs_log = array('bbsid' => $bbsid, 'title' => $title, 'author' => $author, 'content' => $content, 'enddate' => $enddate, 'type' => 10, 'uid' => $uid);
        insert_db('bbs_log', $bbs_log);
        $content = serialize($bbs_log);
        $title = '回复信息';
        get_logadd($id, $content, $title, 12, $_USER->id);
        show_msg('评论发布成功!', 'admin.php?ac=' . $ac . '&fileurl=' . $fileurl . '&do=views&id=' . $bbsid);
    } else {
        if ($id != '') {
            $plan = $db->fetch_one_array("SELECT * FROM " . DB_TABLEPRE . "plan  WHERE id = '{$id}' ");
            $_title['name'] = '信息浏览';
        }
    }
    include_once 'template/planviews.php';
} elseif ($do == 'excel') {
    $datename = "plan_" . get_date('YmdHis', PHP_TIME);
    $outputFileName = 'data/excel/' . $datename . '.xls';
    $content = array();
Example #21
0
     $arr_bank_holidays[] = mktime(0, 0, 0, 11, 11, $year);
     // Armistice 1918
     $arr_bank_holidays[] = mktime(0, 0, 0, 12, 25, $year);
     // Noel
     // Récupération de paques. Permet ensuite d'obtenir le jour de l'ascension et celui de la pentecote
     $easter = self::easter_date($year);
     $arr_bank_holidays[] = $easter + 86400;
     // Paques
     $arr_bank_holidays[] = $easter + 86400 * 39;
     // Ascension
     $arr_bank_holidays[] = $easter + 86400 * 50;
     // Pentecote
     return $arr_bank_holidays;
 }
 if (request_confirm('End_Add_Event')) {
     insert_db('Caranille_Events', $_POST);
 }
 if (request_confirm('End_Edit_Event')) {
     update_db('Caranille_Events', $_POST);
 }
 $month = request_confirm('m') ? str_pad(request_get('m'), 2, "0", STR_PAD_LEFT) : date('m');
 $year = request_confirm('y') ? str_pad(request_get('y'), 4, "0", STR_PAD_LEFT) : date('Y');
 debug_log("period({$year},{$month})");
 $calendar = get_months($year, $month);
 foreach ($calendar as $day => $week) {
     $events[$day] = get_db('request_event', array('date' => "{$year}-{$month}-{$day}%", 'guild' => guild_data('Guild_ID')));
 }
 /**
 	$list_events = list_db('list_event',array(
 			'date' => "$year-$month%",
 			'guild' => guild_data('Guild_ID')
Example #22
0
            }
            preg_match('/<i>注意事项.*?>(.*?)<\\/p/', $str, $match_arr['precautions']);
            //注意事项
            if (empty($match_arr['precautions'][1])) {
                $match_arr['precautions'][1] = '';
                echo "don't get 'precautions' data\n";
            }
            preg_match('/<i>禁忌人群.*?>(.*?)<\\/p/', $str, $match_arr['taboo_crowd']);
            //禁忌人群
            if (empty($match_arr['taboo_crowd'][1])) {
                $match_arr['taboo_crowd'][1] = '';
                echo "don't get 'taboo_crowd' data\n";
            }
            $data = array('skuId' => $match_arr['skuId'][1], 'name' => $match_arr['name'][1], 'adword' => $good['tip'], 'jdPrice' => $good['price'], 'martPrice' => $match_arr['martPrice'][1], 'good' => $match_arr['good'][1], 'good_num' => $match_arr['good_num'][1], 'url' => $good['url'], 'category_1' => $v['category_1'], 'category_2' => $v['category_2'], 'category_3' => $v['category_3'], 'brand_name' => $match_arr['brand_name'][1], 'manufacturer' => $match_arr['manufacturer'][1], 'specification' => $match_arr['specification'][1], 'methods_of_food' => $match_arr['methods_of_food'][1], 'ingredients' => $match_arr['ingredients'][1], 'main_ingredient' => $match_arr['main_ingredient'][1], 'valid' => $match_arr['valid'][1], 'storage' => $match_arr['storage'][1], 'precautions' => $match_arr['precautions'][1], 'taboo_crowd' => $match_arr['taboo_crowd'][1]);
            //插入数据库
            insert_db($data);
            die;
        }
    } while (!empty($url));
}
/**
 * 插入数据库
 * @param  [type] $data [description]
 * @return [type] $inser_num [返回成功插入的数量]
 */
function insert_db($data)
{
    $con = new mysqli("localhost", "root", "", "collection");
    if (!$con) {
        die('连接数据库失败:' . $con->error() . "\n\n");
    }
Example #23
0
         if ($name[$id] != '') {
             $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';
 }
Example #24
0
 public function ads_add($title = 0, $adsurl = 0, $cid = 0, $color = 0)
 {
     $ads = array('title' => $title, 'adsurl' => $adsurl, 'cid' => $cid, 'color' => $color, 'date' => get_date('Y-m-d H:i:s', PHP_TIME));
     insert_db('ads', $ads);
     return;
 }
Example #25
0
                $canback = $row9['id'];
            } else {
                $canback = '0';
            }
        } else {
            if ($canback != '0' && strpos('1' . $row9['name'], get_realname($_USER->id)) >= 1) {
                $db->query("update " . DB_TABLEPRE . "personnel set fileid='被回退:" . $_POST['id'] . "',lnstructions='" . $row9['lnstructions'] . "<br><font color=red>此操作在" . $s4 . "被" . get_realname($_USER->id) . "回退,理由:" . $_POST['ly'] . "</font>' WHERE id =" . $canback . " or id=" . $row9['id']);
                ////////////////////////////////
                $personnel2 = array('type' => $row9['type'], 'name' => $row9['name'], 'uid' => $row9['uid'], 'node' => $row9['node'], 'pkey' => 0, 'fileid' => $row9['fileid'], 'apptype' => $row9['apptype'], 'appflow' => $row9['appflow'], 'appkey' => $row9['appkey'], 'appkey1' => $row9['appkey1']);
                insert_db('personnel', $personnel2);
                if ($row9['appkey'] == '1') {
                    $staff = explode(',', $row9['name']);
                    $staffid = explode(',', $row9['uid']);
                    for ($i = 0; $i < sizeof($staffid); $i++) {
                        $personnel_log = array('type' => 2, 'name' => $staff[$i], 'uid' => $staffid[$i], 'pkey' => 0, 'perid' => $row9['id']);
                        insert_db('personnel_log', $personnel_log);
                    }
                }
                //$db->query('UPDATE personnel SET oapostscript ="流程被回退,理由:".$_POST['ly'] where id=');
                /////////////////////////////
                if ($_POST['type'] == '1') {
                    show_msg('操作成功,当前步骤已被撤销!', 'admin.php?ac=attachment&fileurl=app&type=5');
                } else {
                    show_msg('操作成功,当前步骤已被撤销!', 'admin.php?ac=approval&fileurl=app&type=5');
                }
            } else {
                echo '在您提交回退操作前,该公文状态已发生变化,且当前状态无法进行回退操作!';
            }
        }
    }
} else {
Example #26
0
function config_race()
{
    insert_db('Caranille_Races', array('Race_Name' => 'Néphilims', 'Race_Description' => 'croisement maudits des anges et des démons'));
    insert_db('Caranille_Races', array('Race_Name' => 'Humains', 'Race_Description' => 'Rejetés du ciel et de l\'enfer, la terre est devenu leur royaume souverain'));
}
Example #27
0
<?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');
}
Example #28
0
        $newname = substr($newname, 0, -1);
        $newpersno = substr($newpersno, 0, -1);
        $newinherited = substr($newinherited, 0, -1);
        $newname = explode(',', $newname);
        $newpersno = explode(',', $newpersno);
        $newinherited = explode(',', $newinherited);
        if ($newname != '') {
            for ($i = 0; $i < sizeof($newname); $i++) {
                if ($newname[$i] != '') {
                    if ($newinherited[$i] != '') {
                        $fatherid = trim($newinherited[$i]);
                    } else {
                        $fatherid = '0';
                    }
                    $department = array('name' => $newname[$i], 'persno' => $newpersno[$i], 'father' => $fatherid, 'date' => $date);
                    insert_db('department', $department);
                }
            }
        }
        $str = ',新增了<font color=red>' . sizeof($newname) . '</font>条信息';
    }
    $content = serialize($idarr) . serialize($persno) . serialize($name);
    $title = '部门信息';
    get_logadd($id, $content, $title, 18, $_USER->id);
    oa_mana_recache('department', 'id', 'id');
    show_msg('批量部门信息更新成功' . $str . '!', 'admin.php?ac=' . $ac . '&fileurl=' . $fileurl . '');
} elseif ($_GET['do'] == 'update') {
    $db->query("DELETE FROM " . DB_TABLEPRE . "department WHERE id = '" . $_GET[id] . "' ");
    $db->query("UPDATE " . DB_TABLEPRE . "department set father='" . $_GET['fid'] . "' WHERE father = '" . $_GET[id] . "' ");
    oa_mana_recache('department', 'id', 'id');
    show_msg('部门信息删除成功!', 'admin.php?ac=' . $ac . '&fileurl=' . $fileurl . '');
Example #29
0
    //处理编码问题
    $utf8_json = characet($json);
    //json解析为数组
    $arr = json_decode($utf8_json, true);
    //获取页码
    $page = $arr['page']['currentPage'];
    //获取总页码
    $totalPage = $arr['page']['totalPage'];
    //获取商品列表
    $lists = $arr['itemList'];
    //计算总共商品数
    $count = count($lists);
    //向终端输出信息
    echo "获取....第" . $page . "页,共" . $count . "条信息\n";
    //开始插入数据库
    $insert_num = insert_db($lists);
    //向终端输出信息
    echo "\n";
    echo "成功" . $insert_num . "条 失败" . ($count - $insert_num) . "条\n\n";
    $page++;
} while ($page <= $totalPage);
/**
 * 插入数据库
 * @param  [type] $data [description]
 * @return [type] $inser_num [返回成功插入的数量]
 */
function insert_db($data)
{
    echo "开始写入数据库\n";
    $insert_num = 0;
    //成功插入的数量
Example #30
0
    }
    $content = serialize($idarr);
    $title = '删除项目类别';
    get_logadd($id, $content, $title, 32, $_USER->id);
    show_msg('项目类别删除成功!', 'admin.php?ac=' . $ac . '&fileurl=' . $fileurl . '');
} 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')));