当前位置: 首页>>代码示例>>PHP>>正文


PHP log_admin函数代码示例

本文整理汇总了PHP中log_admin函数的典型用法代码示例。如果您正苦于以下问题:PHP log_admin函数的具体用法?PHP log_admin怎么用?PHP log_admin使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了log_admin函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: require_once

/**
 * 编辑
 * @author abei<abei1982@qq.com>
 */
require_once(dirname(dirname(dirname(__FILE__))) . '/app.php');

need_manager();
need_auth('worker');

$worker_id = $_GET['id'];

//	get the infor of worker
$worker = Table::Fetch('worker',$worker_id);
if(!$worker){
	Session::Set('error', '该员工不存在');
	redirect( WEB_ROOT . "/manage/worker/index.php");
}

if($_POST){
	$arr = $_POST['worker'];	
	$arr['birth'] = !empty($arr['birth']) ? strtotime($arr['birth']) : NULL;
	$arr['in_time'] = !empty($arr['in_time']) ? strtotime($arr['in_time']) : NULL;

	if(DB::Update('worker',$worker_id,$arr)){
		log_admin('worker', '编辑员工成功',$arr);
		Session::Set('notice', '编辑员工成功');
		redirect( WEB_ROOT . "/manage/worker/index.php");
	}
}

include template('manage_worker_edit');
开发者ID:noikiy,项目名称:mdwp,代码行数:31,代码来源:edit.php

示例2: abs

	$INI['system']['partnerdown'] = abs(intval($INI['system']['partnerdown']>0));
	$INI['system']['conduser'] = abs(intval($INI['system']['conduser']>0));
	$INI['system']['currencyname'] = strtoupper($INI['system']['currencyname']);
	//2013.07.29
	$sorts = array('MO', 'NO', 'AF', 'NI');
	$sorts_key = array_search($INI['system']['sorttype'], $sorts);
	if(!$sorts_key) $sorts_key = 0;
	$INI['system']['sorttype'] = $sorts[($sorts_key + 1)%4];
	
	save_config();

	$value = Utility::ExtraEncode($INI);
	$table = new Table('system', array('value'=>$value));
	if ( $system ) $table->SetPK('id', 1);
	$flag = $table->update(array( 'value'));
    log_admin('system', '编辑基本设置',$_POST);
	Session::Set('notice', '更新系统信息成功');
	redirect( null );
}

include template("manage_system_index{$ts}");

function current_system_index($s=null) {
	global $city;
	$filter = array(
		'a' => 'AAAAAAA',
		'b' => 'BBBBBBBBB',
		'c' => 'CCCCCCCC',
		'd' => 'DDDDDDDDD',
		'e' => 'EEEEEEEEE',
	);
开发者ID:noikiy,项目名称:mdwp,代码行数:31,代码来源:index.php

示例3: dirname

<?php

require_once dirname(dirname(dirname(__FILE__))) . '/app.php';
need_manager();
need_auth('admin');
$action = strval($_GET['action']);
$id = abs(intval($_GET['id']));
$r = udecode($_GET['r']);
$tid = strval($_GET['tid']);
$cate = strval($_GET['cate']);
$like = strval($_GET['like']);
if ($action == 'r') {
    $order = Table::Fetch('order', $id);
    log_admin('misc', '删除订单点评', $order['comment_content']);
    Table::UpdateCache('order', $id, array('comment_content' => 'Null'));
    redirect($r);
}
if ($action == 'none') {
    Table::UpdateCache('order', $id, array('comment_display' => 'N'));
    redirect($r);
}
if ($action == 'block') {
    Table::UpdateCache('order', $id, array('comment_display' => 'Y'));
    redirect($r);
}
$condition = array("comment_time > 0 AND comment_content <> 'Null'");
if ($tid) {
    $condition['team_id'] = $tid;
}
if ($cate) {
    $condition['comment_grade'] = $cate;
开发者ID:norain2050,项目名称:zuituware,代码行数:31,代码来源:comment.php

示例4: dirname

<?php

require_once dirname(dirname(dirname(__FILE__))) . '/app.php';
need_manager(true);
$system = Table::Fetch('system', 1);
if ($_POST) {
    unset($_POST['commit']);
    $INI = Config::MergeINI($INI, $_POST);
    $INI = ZSystem::GetUnsetINI($INI);
    save_config();
    $value = Utility::ExtraEncode($INI);
    $table = new Table('system', array('value' => $value));
    if ($system) {
        $table->SetPK('id', 1);
    }
    $flag = $table->update(array('value'));
    log_admin('system', '编辑短信设置');
    Session::Set('notice', '更新系统信息成功');
    redirect(WEB_ROOT . '/manage/system/sms.php');
}
include template('manage_system_sms');
开发者ID:norain2050,项目名称:zuituware,代码行数:21,代码来源:sms.php

示例5: delete

 public function delete()
 {
     if ($_POST) {
         $id = $this->input->post('id');
         $query = $this->leavegroup->get_detail_by_id($id);
         if ($query->num_rows() > 0) {
             $query = $query->row_array();
             $name = $query['LGName'];
             $desc = $query['LGDesc'];
             $this->leavegroup->delete($id);
             log_admin('delete', $id, 'leave group', 'delete leave group [name] ' . $name . ' [desc] ' . $desc, $this->user_id);
         }
     }
 }
开发者ID:KanexKane,项目名称:hrsystem,代码行数:14,代码来源:Leavegroup.php

示例6: dirname

<?php

require_once dirname(dirname(dirname(__FILE__))) . '/app.php';
need_manager();
need_auth('market');
$action = strval($_GET['action']);
$id = abs(intval($_GET['id']));
$r = udecode($_GET['r']);
$cate = strval($_GET['cate']);
$like = strval($_GET['like']);
if ($action == 'r') {
    $feed = Table::Fetch('feedback', $id);
    log_admin('misc', '删除意见反馈', $feed);
    Table::Delete('feedback', $id);
    redirect($r);
} else {
    if ($action == 'm') {
        Table::UpdateCache('feedback', $id, array('user_id' => $login_user_id));
        redirect($r);
    }
}
$condition = array();
if ($cate) {
    $condition['category'] = $cate;
}
if ($like) {
    $condition[] = "content like '%" . mysql_escape_string($like) . "%'";
}
$count = Table::Count('feedback', $condition);
list($pagesize, $offset, $pagestring) = pagestring($count, 20);
$asks = DB::LimitQuery('feedback', array('condition' => $condition, 'order' => 'ORDER BY id DESC', 'size' => $pagesize, 'offset' => $offset));
开发者ID:norain2050,项目名称:zuituware,代码行数:31,代码来源:feedback.php

示例7: require_once

<?php
/**
 * 发工资
 * @author abei<abei1982@qq.com>
 */
require_once(dirname(dirname(dirname(__FILE__))) . '/app.php');

need_manager();
need_auth('worker'); 

$worker_id = $_GET['id'];
$worker = Table::Fetch('worker',$worker_id);

if($_POST){
	$salary = $_POST['salary'];
	$salary['worker_id'] = $worker_id;
	$salary['salary_time'] = strtotime($salary['salary_time']);
	$salary['create_time'] = time();

	if(DB::Insert('worker_salary',$salary)){
		log_admin('worker_salary', '发工资成功',$salary);
		Session::Set('notice', '发工资成功');
		redirect( WEB_ROOT . "/manage/worker/salary.php?id=".$worker_id);
	}
}

include template('manage_worker_add_salary');
开发者ID:noikiy,项目名称:mdwp,代码行数:27,代码来源:add_salary.php

示例8: dirname

<?php

/***
 * 管理员操作日志
 * @author c
 * @data 2011-2-19
 * @file logger.php
 ***/
require_once dirname(dirname(dirname(__FILE__))) . '/app.php';
need_manager(true);
/* 清除日志 */
$clear_data = strval($_POST['clear_data']);
if ($clear_data) {
    DB::Query('TRUNCATE TABLE `logger_admin`;');
    log_admin('system', '清空管理员操作日志');
}
$search = strval($_GET['search']);
$type = strval($_GET['type']);
$condition = array();
/* filter */
if ($search) {
    $t_con['OR'] = array("id like '%" . mysql_escape_string($search) . "%'", "email like '%" . mysql_escape_string($search) . "%'");
    $teams = DB::LimitQuery('user', array('condition' => $t_con, 'one' => true));
    $condition['user_id'] = $teams['id'];
}
if ($type) {
    $condition['type'] = $type;
}
/* end filter */
$count = Table::Count('logger_admin', $condition);
list($pagesize, $offset, $pagestring) = pagestring($count, 20);
开发者ID:norain2050,项目名称:zuituware,代码行数:31,代码来源:logger.php

示例9: strval

$version = strval(SYS_VERSION);
$subversion = strval(SYS_SUBVERSION);
$action = strval($_GET['action']);

$version_meta = zuitu_version($version);
$newversion = $version_meta['version'];
$newsubversion = $version_meta['subversion'];
$software = $version_meta['software'];
$isnew = ( $newversion==$version && $subversion == $newsubversion ) ;

if ( 'db' == $action ) {
	$r = zuitu_upgrade($action, $version);
	log_admin('misc', '升级数据库结构');
	Session::Set('notice', '数据库结构升级成功,数据库已经是最新版本');
	redirect( WEB_ROOT . '/manage/misc/index.php' );
}
else if ( 'opt' == $action ) {
	$tables = DB::GetQueryResult("SHOW TABLE STATUS", false);
	foreach($tables AS $one) {
		DB::Query("OPTIMIZE TABLE {$one['name']}");
	}
    log_admin('misc', '数据库结构优化');
	Session::Set('notice', '数据库结构优化完成');
	redirect( WEB_ROOT . '/manage/misc/index.php' );
}

include template('manage_misc_index');
function sum($a=array(), $k=null) {
    $r=0; foreach($a AS $i=>$v) $r+=$v; return $r;
}
开发者ID:noikiy,项目名称:mdwp,代码行数:30,代码来源:index.php

示例10: Table

$ts = $s ? '_' . $s : null;

$system = Table::Fetch('system', 1);

if ($_POST) {
	need_manager(true);
	unset($_POST['commit']);
	$INI = Config::MergeINI($INI, $_POST);
	$INI = ZSystem::GetUnsetINI($INI);
	save_config();

	$value = Utility::ExtraEncode($INI);
	$table = new Table('system', array('value'=>$value));
	if ( $system ) $table->SetPK('id', 1);
	$flag = $table->update(array( 'value'));
    log_admin('system', '编辑选项设置',$_POST);
	Session::Set('notice', '更新系统信息成功');
	redirect(null);	
}

include template("manage_system_option{$ts}");

function current_system_option($s=null) {
	global $city;
	if (option_yes('daysign')){
		$filter = array(
			'a' => '页面设置',
			'b' => '地址重写',
			'c' => '登录设置',
			'd' => '每日签到设置',
	    );
开发者ID:noikiy,项目名称:mdwp,代码行数:31,代码来源:option.php

示例11: need_manager

need_manager();
need_auth('admin');
$root = DIR_TEMPLATE;
$template_id = trim(strval($_GET['id']));
$template_id = str_replace('\\', '_', $template_id);
$template_id = str_replace('/', '_', $template_id);
if ($_POST) {
    $path = "{$root}/{$template_id}";
    if (is_writable($path) && !is_dir($path) && is_file($path)) {
        $flag = file_put_contents($path, stripslashes(trim($_POST['content'])));
    }
    if ($flag) {
        log_admin('system', '编辑模板成功:' . $template_id);
        Session::Set('notice', "模板 {$template_id} 修改成功");
    } else {
        log_admin('system', '编辑模板失败:' . $template_id);
        Session::Set('error', "模板 {$template_id} 修改失败");
    }
    redirect(WEB_ROOT . "/manage/system/template.php?id={$template_id}");
}
$handle = opendir($root);
$may = array();
while ($one = readdir($handle)) {
    if (is_dir("{$root}/{$one}")) {
        continue;
    }
    if (!is_writable("{$root}/{$one}")) {
        continue;
    }
    $may[] = $one;
}
开发者ID:norain2050,项目名称:zuituware,代码行数:31,代码来源:template.php

示例12: need_auth

                    } else {
                        if ($action == 'withdraw_submit') {
                            need_auth('caiwu_dowithdraw');
                            $apply = Table::Fetch('apply', $id);
                            $user = Table::Fetch('user', $apply['user_id']);
                            $direction = strval($_GET['direction']);
                            $withdrawpay = strval($_GET['withdrawpay']);
                            $withdrawcontent = strval($_GET['c']);
                            $money = moneyit($_GET['withdrawmoney']);
                            if ($money > 0) {
                                log_admin('caiwu', $user['email'] . '充值' . $money . '元失败 - 本次操作仅限提现');
                                json('充值失败 - 本次操作仅限提现', 'alert');
                            } elseif ($money < 0 && $user['money'] + $money < 0) {
                                json('提现失败 - 用户余额不足', 'alert');
                            }
                            Table::UpdateCache('apply', $id, array('direction' => 'yuanlu', 'withdraw_direction' => $direction, 'withdrawpay' => $withdrawpay, 'content' => $withdrawcontent, 'done_time' => time(), 'admin_name' => $login_user['realname'], 'admin_id' => $login_user_id));
                            if (ZFlow::CreateFromStore($apply['user_id'], $money)) {
                                Table::UpdateCache('apply', $id, array('status' => 'be', 'done_time' => time(), 'admin_name' => $login_user['realname'], 'admin_id' => $login_user_id));
                                log_admin('caiwu', '[提现申请]' . $user['username'] . '提现' . $money . '元');
                                if (option_yes('chongtisms')) {
                                    sms_withdraw($id);
                                }
                                json(array(array('data' => "用户提现{$money}元成功", 'type' => 'alert'), array('data' => null, 'type' => 'refresh')), 'mix');
                            }
                        }
                    }
                }
            }
        }
    }
}
开发者ID:noikiy,项目名称:mdwp,代码行数:31,代码来源:apply.php

示例13: require_once

<?php
require_once(dirname(dirname(dirname(__FILE__))) . '/app.php');

need_manager(true);
need_rbac_auth('system_cache');
$system = Table::Fetch('system', 1);

if ($_POST) {
	unset($_POST['commit']);
	$INI = Config::MergeINI($INI, $_POST);
	if ( !save_config('php') ) {
		Session::Set('notice', '保存失败,'.SYS_PHPFILE.' 不可写');
	} else {
		$INI = ZSystem::GetUnsetINI($INI);
		$value = Utility::ExtraEncode($INI);
		$table = new Table('system', array('value'=>$value));
		if ( $system ) $table->SetPK('id', 1);
		$flag = $table->update(array( 'value'));
        log_admin('system', '编辑缓存设置',$_POST);
		Session::Set('notice', '更新系统信息成功');
	}
	redirect( WEB_ROOT . '/manage/system/cache.php');	
}

include template('manage_system_cache');
开发者ID:noikiy,项目名称:mdwp,代码行数:25,代码来源:cache.php

示例14: delete

 public function delete()
 {
     if ($_POST) {
         $post = $this->input->post();
         $department_id = $post['id'];
         $department_name = '';
         $query = $this->department->get_detail_by_id($department_id);
         if ($query->num_rows() > 0) {
             $query = $query->row_array();
             $department_name = $query['DName'];
             $where = array('DID' => $department_id);
             $data = array('D_StatusID' => '-999');
             $this->department->update($data, $where);
             log_admin('insert', $department_id, 'department', 'delete department [name] ' . $department_name, $this->user_id);
         }
     }
 }
开发者ID:KanexKane,项目名称:hrsystem,代码行数:17,代码来源:Department.php

示例15: log_admin

		else $u = Table::Fetch('user', $username, 'username');
		if ($u && $credit) {
			ZCredit::Create($credit, $u['id'], 'charge', 0);
            log_admin('credit', $u['username'].'用户积分充值',$u);
			redirect(null, '用户积分充值成功!');
		}
	}
	else if ( 'settings' == $action ) {
		$INI['credit']['register'] = abs(intval($_POST['credit']['register']));
		$INI['credit']['login'] = abs(intval($_POST['credit']['login']));
		$INI['credit']['invite'] = abs(intval($_POST['credit']['invite']));
		$INI['credit']['buy'] = abs(intval($_POST['credit']['buy']));
		$INI['credit']['pay'] = 0 + ($_POST['credit']['pay']);
		$INI['credit']['charge'] = 0 + ($_POST['credit']['charge']);
        $INI['credit']['comment'] = abs(intval($_POST['credit']['comment']));
		configure_save('credit');
        log_admin('credit', '设置积分规则',$_POST);
		redirect(null, '设置积分规则成功!');
	}
}

$INI['credit']['register'] = abs(intval($INI['credit']['register']));
$INI['credit']['login'] = abs(intval($INI['credit']['login']));
$INI['credit']['invite'] = abs(intval($INI['credit']['invite']));
$INI['credit']['buy'] = abs(intval($INI['credit']['buy']));
$INI['credit']['comment'] = abs(intval($INI['credit']['comment']));
$INI['credit']['pay'] = 0 + ($INI['credit']['pay']);
$INI['credit']['charge'] = 0 + ($INI['credit']['charge']);

include template('manage_credit_settings');
开发者ID:noikiy,项目名称:mdwp,代码行数:30,代码来源:settings.php


注:本文中的log_admin函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。