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


PHP update_log函数代码示例

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


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

示例1: error_reporting

<?php

error_reporting(E_ALL ^ E_NOTICE);
include_once "includes.php";
update_log('', 'xlogout', 1);
@session_start();
//@session_unregister();
@session_unset();
@session_destroy();
@session_start();
$_SESSION['errmsg'] = "Anda telah logout. Terima kasih.";
?>

<meta http-equiv="refresh" content="0;URL=../login.php">
开发者ID:abbeet,项目名称:server39,代码行数:14,代码来源:logout.php

示例2: new_hours

function new_hours(&$state)
{
    log_list($state, $state->row);
    //find this row's records
    //Do audits:
    if ($state->mode == "t") {
        $logdate = clone $state->from_date;
    } elseif ($state->row == 0) {
        //adding in List mode
        $logdate = clone $state->logdate;
        //created by DATE_PICK
    } else {
        $record = reset($state->records);
        //updating in list mode
        $logdate = clone $record["logdate"];
    }
    $status = array();
    if (!audit_hours($state, $logdate, $status)) {
        return;
    }
    //Do DB changes:
    //	adding a row but didn't select existing activity:
    if ($state->row == 0 && $state->activity_id == 0) {
        add_activity($state);
    }
    $columns = $state->mode == "l" ? 1 : $state->columns[COL_COUNT];
    for ($ndx = 0; $ndx < $columns; $ndx++, $logdate->add(new DateInterval('P1D'))) {
        switch ($status[$ndx]) {
            case 'a':
                //add
                add_log($state, $logdate, $ndx);
                break;
            case 'u':
                //update
                update_log($state, $ndx);
                break;
            case 'd':
                //delete
                delete_log($state, $ndx);
                break;
        }
    }
}
开发者ID:fortyspokes,项目名称:ProjectLogs,代码行数:43,代码来源:timelog.php

示例3: new_hours

function new_hours(&$state)
{
    $logdate = clone $state->from_date;
    if ($state->columns < 0 && $state->row == 0) {
        //add a rec in list style
        if (!audit_date($state, $logdate)) {
            return;
        }
    }
    $status = array();
    if (!audit_hours($state, $logdate, $status)) {
        return;
    }
    //adding a row but didn't select existing activity:
    if ($state->row == 0 && $state->activity_id == 0) {
        add_activity($state);
    }
    for ($ndx = 0; $ndx < abs($state->columns); $ndx++, $logdate->add(new DateInterval('P1D'))) {
        switch ($status[$ndx]) {
            case 'a':
                //add
                add_log($state, $logdate, $ndx);
                break;
            case 'u':
                //update
                update_log($state, $logdate, $ndx);
                break;
            case 'd':
                //delete
                delete_log($state, $logdate, $ndx);
                break;
        }
    }
}
开发者ID:bbogin,项目名称:sr2s,代码行数:34,代码来源:timelog.php

示例4: mysql_query

            $s_delete_pot = "DELETE FROM potongan WHERE kdunit = '" . $kdunit . "' AND bulan = '" . $y . "-" . $m . "'";
            $q_delete_pot = mysql_query($s_delete_pot);
            update_log("Hapus presensi bulan " . nama_bulan($m + 0) . " " . $y . " berhasil.", "presensi", 1);
            $_SESSION['errmsg'] = "Hapus presensi bulan " . nama_bulan($m + 0) . " " . $y . " berhasil.";
            ?>
				
				<meta http-equiv="refresh" content="0;URL=index.php?p=468"><?php 
        } else {
            update_log("Hapus presensi bulan " . nama_bulan($m + 0) . " " . $y . " gagal.", "presensi", 0);
            $_SESSION['errmsg'] = "Hapus presensi bulan " . nama_bulan($m + 0) . " " . $y . " gagal.";
            ?>
				
				<meta http-equiv="refresh" content="0;URL=index.php?p=468"><?php 
        }
    } else {
        update_log("Hapus presensi bulan " . nama_bulan($m + 0) . " " . $y . " gagal. Data sudah diverifikasi", "presensi", 0);
        $_SESSION['errmsg'] = "Hapus presensi bulan " . nama_bulan($m + 0) . " " . $y . " gagal. Data sudah diverifikasi";
        ?>
			
			<meta http-equiv="refresh" content="0;URL=index.php?p=468"><?php 
    }
}
?>

	<form action="" method="post" name="xPresensi">
		<fieldset>
			<table class="admintable" cellspacing="1">
				<tr>
					<td class="key">&nbsp;</td>
					<td><font color="red">*Hati-hati!! Semua data pada bulan terpilih akan dihapus!!</font></td>
				</tr>
开发者ID:abbeet,项目名称:server39,代码行数:31,代码来源:presensi_del.php

示例5: new_counts

function new_counts(&$state)
{
    log_list($state, $state->row);
    //find this row's records
    $state->recID = 0;
    if ($state->row > 0) {
        //updating (0 is add row)
        $record = reset($state->records);
        if ($record["ID"] == 0) {
            throw_the_bum_out(NULL, "Evicted(" . __LINE__ . "): invalid POST 1", true);
        }
        $state->recID = $record["ID"];
    }
    if (!audit_counts($state)) {
        return;
    }
    if (substr($_POST["comments"], 0, 1) == "\n") {
        $_POST["comments"] = "---";
    }
    $logdate = clone $state->from_date;
    if ($state->row == 0) {
        //adding
        add_log($state, $state->logdate);
        return;
    }
    if ($record["event_id"] != $_POST["event"] || $record["account_id"] != $_POST["account"]) {
        throw_the_bum_out(NULL, "Evicted(" . __LINE__ . "): invalid record " . $recID, true);
    }
    if ($_POST["sessions"] == 0) {
        delete_log($state);
    } else {
        update_log($state);
    }
}
开发者ID:fortyspokes,项目名称:ProjectLogs,代码行数:34,代码来源:eventlog.php

示例6: checkauthentication

<?php

checkauthentication();
$table = "sifatsurat";
$h = ekstrak_get($get[1]);
$q = ekstrak_get($get[2]);
$omenu = xmenu("parent", "id = '" . $p . "'");
$xmenu = mysql_fetch_array($omenu);
$p_next = $xmenu['parent'] . "&h=" . $h;
$sql = sql_delete($table, "IdSifat", $q);
$query = mysql_query($sql);
if ($query == 1) {
    $msg = "Hapus sifat surat berhasil. Id = " . $q . ".";
    update_log($msg, $table, $susername, 1);
    $_SESSION['errmsg'] = $msg;
} else {
    $msg = "Hapus sifat surat gagal. Id = " . $q . ".";
    update_log($msg, $table, $susername, 0);
    $_SESSION['errmsg'] = $msg;
}
?>
	
	<meta http-equiv="refresh" content="0;URL=index.php?p=<?php 
echo enkripsi($p_next);
?>
"><?php 
exit;
开发者ID:abbeet,项目名称:server39,代码行数:27,代码来源:sifat_surat_del.php

示例7: import

                    }
                    $c++;
                }
            }
            if ($exec) {
                $_SESSION['errmsg'] = "Upload data berhasil!";
                if ($date_from_text > $date_from) {
                    $date_from = $date_from_text;
                }
                if ($date_until_text < $date_until) {
                    $date_until = $date_until_text;
                }
                $sql = "\r\n\t\t\t\t\t\tINSERT INTO import (date_from, date_until, file, importby) \r\n\t\t\t\t\t\tVALUES ('" . $date_from . "', '" . $date_until . "', '" . $filename . "', '" . $Session['xusername'] . "')\r\n\t\t\t\t\t";
                $log_txt .= $sql . "\n";
                mysql_query($sql);
                update_log("Upload data berhasil!", "import", 1);
            }
        }
        fwrite($myfile, $log_txt);
    }
    ?>
			
		<meta http-equiv="refresh" content="0;URL=index.php?p=<?php 
    echo $p;
    ?>
"><?php 
}
?>

	<form action="index.php?p=<?php 
echo $_GET['p'];
开发者ID:abbeet,项目名称:server39,代码行数:31,代码来源:import.php

示例8: new_info

function new_info(&$state)
{
    $state->recID = 0;
    if ($state->row > 0) {
        //0 is add row
        log_list($state);
        foreach ($state->records as $recID => $record) {
            $state->recID = $recID;
            if ($record["row"] == $state->row) {
                break;
            }
        }
        if ($state->recID == 0) {
            throw_the_bum_out(NULL, "Evicted(" . __LINE__ . "): invalid POST", true);
        }
    }
    if (!audit_counts($state)) {
        return false;
    }
    if (substr($_POST["comments"], 0, 1) == "\n") {
        $_POST["comments"] = "---";
    }
    $logdate = clone $state->from_date;
    if ($state->recID == 0) {
        //adding
        if (!audit_date($state, $logdate)) {
            return false;
        }
        add_log($state);
        return;
    }
    if ($state->records[$state->recID]["event_id"] != $_POST["event"] || $state->records[$state->recID]["account_id"] != $_POST["account"]) {
        throw_the_bum_out(NULL, "Evicted(" . __LINE__ . "): invalid record " . $recID, true);
    }
    if ($_POST["sessions"] == 0) {
        delete_log($state);
    } else {
        update_log($state);
    }
}
开发者ID:bbogin,项目名称:sr2s,代码行数:40,代码来源:eventlog.php

示例9: date

            @session_id();
            @session_register('sukki');
            $_SESSION['sukki'] = 1;
            @session_register('xusername');
            $_SESSION['xusername'] = $xuser->username;
            @session_register('xlevel');
            $_SESSION['xlevel'] = $xuser->level;
            @session_register('xuserid');
            $_SESSION['xuserid'] = $xuser->id;
            @session_register('xuserpass');
            $_SESSION['xuserpass'] = $xuser->password;
            @session_register('xkdunit');
            $_SESSION['xkdunit'] = $xuser->kdunit;
            @session_register('xth');
            $_SESSION['xth'] = date('Y');
            update_log($sql, 'xlogin', 1);
            update_lastvisit($xuser->id);
            ?>
				<meta http-equiv="refresh" content="0;URL=../skpRistek/index.php" /><?php 
            exit;
        }
    }
}
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
		<title><?php 
echo $title;
?>
</title>
开发者ID:abbeet,项目名称:server39,代码行数:31,代码来源:login.php

示例10: update_log

						<meta http-equiv="refresh" content="0;URL=../login.php" /><?php 
                }
            } else {
                $msg = "Nama pengguna tidak terdaftar.";
                $_SESSION['errmsg'] = $msg;
                update_log($msg, 'xlogin', $xusername, 0);
                ?>
				
					<meta http-equiv="refresh" content="0;URL=../login.php" /><?php 
            }
        } else {
            $msg = "Kata sandi kosong.";
            $_SESSION['errmsg'] = $msg;
            update_log($msg, 'xlogin', $xusername, 0);
            ?>
				
				<meta http-equiv="refresh" content="0;URL=../login.php" /><?php 
        }
    } else {
        $msg = "Nama pengguna kosong.";
        $_SESSION['errmsg'] = $msg;
        update_log($msg, 'xlogin', $xusername, 0);
        ?>
			
			<meta http-equiv="refresh" content="0;URL=../login.php" /><?php 
    }
} else {
    ?>
	
		<meta http-equiv="refresh" content="0;URL=../login.php" /><?php 
}
开发者ID:abbeet,项目名称:server39,代码行数:31,代码来源:login.php

示例11: mysql_query

                }
            }
            $s_update_cs = "UPDATE potongan SET CSRI = '" . $potongan_cs . "' WHERE id = '" . $potongan['id'] . "'";
            $q_update_cs = mysql_query($s_update_cs);
            #END 30 Nov 2014 ###########################################################################
            if ($rs) {
                update_log("Ubah data presensi berhasil. NIP = " . $nip, "presensi", 1);
                $_SESSION['errmsg'] = "Ubah data presensi berhasil.";
                ?>
					
                    <meta http-equiv="refresh" content="0;URL=index.php?p=468&<?php 
                echo $url;
                ?>
"><?php 
            } else {
                update_log("Ubah data presensi gagal. NIP = " . $nip, "presensi", 0);
                $_SESSION['errmsg'] = "Ubah data presensi gagal.";
                ?>
					
                    <meta http-equiv="refresh" content="0;URL=index.php?p=468&<?php 
                echo $url;
                ?>
"><?php 
            }
        }
    } else {
        ?>
			<meta http-equiv="refresh" content="0;URL=index.php?p=468&<?php 
        echo $url;
        ?>
"><?php 
开发者ID:abbeet,项目名称:server39,代码行数:31,代码来源:presensi_ed.php

示例12: new_amount

function new_amount(&$state)
{
    log_list($state, $state->row);
    //find this row's records
    //Do audits:
    $record = reset($state->records);
    if ($state->type == "") {
        $state->type = $record["type"];
    }
    $status = "";
    if (!audit_amount($state, $status)) {
        return;
    }
    //Do DB changes:
    //	adding a row but didn't select existing activity:
    if ($state->row == 0 && $state->activity_id == 0) {
        add_activity($state);
    }
    switch ($status) {
        case 'a':
            //add
            add_log($state);
            break;
        case 'u':
            //update
            update_log($state);
            break;
        case 'd':
            //delete
            delete_log($state);
            break;
    }
}
开发者ID:fortyspokes,项目名称:ProjectLogs,代码行数:33,代码来源:expense.php

示例13: update_log

<?php

include_once "includes.php";
update_log('Logout success.', 'xlogout', @$_GET['u'], 1);
session_start();
session_unset();
session_destroy();
session_start();
$_SESSION['errmsg'] = "Logout success.";
?>

<meta http-equiv="refresh" content="0;URL=../login.php">
开发者ID:abbeet,项目名称:server39,代码行数:12,代码来源:logout.php

示例14: new_info

function new_info(&$state)
{
    global $_DB;
    $state->recID = 0;
    if ($state->process == "u") {
        log_list($state);
        foreach ($state->records as $recID => $record) {
            $state->recID = $recID;
            if ($record["row"] == $state->row) {
                break;
            }
        }
        if ($state->recID == 0) {
            throw_the_bum_out(NULL, "Evicted(" . __LINE__ . "): invalid POST", true);
        }
    }
    if (!audit_counts($state)) {
        return false;
    }
    if (substr($_POST["comments"], 0, 1) == "\n") {
        $_POST["comments"] = "---";
    }
    if ($state->recID == 0) {
        //adding
        add_log($state);
        return true;
    }
    if ($state->records[$state->recID]["event_id"] != $_POST["event"]) {
        throw_the_bum_out(NULL, "Evicted(" . __LINE__ . "): invalid record " . $recID, true);
    }
    if ($_POST["sessions"] == 0) {
        delete_log($state);
    } else {
        update_log($state);
    }
    return true;
}
开发者ID:bbogin,项目名称:sr2s,代码行数:37,代码来源:event_count.php

示例15: new_info

function new_info(&$db, &$state)
{
    if (!isset($_POST["recID"])) {
        throw_the_bum_out(NULL, "Evicted(" . __LINE__ . "): invalid POST", true);
    }
    if (!audit_counts($db, $state)) {
        return false;
    }
    $recID = $_POST["recID"];
    if ($recID == 0) {
        //adding
        add_log($db, $state);
        return true;
    }
    log_list($db, $state);
    if (!array_key_exists(strval($recID), $state->records)) {
        throw_the_bum_out(NULL, "Evicted(" . __LINE__ . "): invalid recID " . $recID, true);
    }
    if ($state->records[$recID]["event_id"] != $_POST["event"]) {
        throw_the_bum_out(NULL, "Evicted(" . __LINE__ . "): invalid record " . $recID, true);
    }
    if ($_POST["sessions"] == 0) {
        delete_log($db, $state);
    } else {
        update_log($db, $state);
    }
    return true;
}
开发者ID:bbogin,项目名称:sr2s,代码行数:28,代码来源:event_count+(another+copy).php


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