本文整理汇总了PHP中update_log函数的典型用法代码示例。如果您正苦于以下问题:PHP update_log函数的具体用法?PHP update_log怎么用?PHP update_log使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了update_log函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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"> </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
示例16: mysql_query
$q_update = mysql_query($s_update);
}
$s_update_ver = "UPDATE proses_verifikasi SET status_verifikasi_potongan = '" . $ver . "', tanggal_verifikasi_potongan = '" . date("Y-m-d") . "' \r\n\t\t\t\tWHERE id = '" . $id_ver . "'";
#echo $s_update_ver."<BR>";
$q_update_ver = mysql_query($s_update_ver);
if ($q_update_ver) {
update_log("Verifikasi potongan berhasil.", "potongan", 1);
$_SESSION['errmsg'] = "Verifikasi potongan berhasil.";
?>
<meta http-equiv="refresh" content="0;URL=index.php?p=475&<?php
echo $url;
?>
"><?php
} else {
update_log("Verifikasi potongan gagal.", "potongan", 0);
$_SESSION['errmsg'] = "Verifikasi potongan berhasil.";
?>
<meta http-equiv="refresh" content="0;URL=index.php?p=475&<?php
echo $url;
?>
"><?php
}
}
#}
}
?>
<script language="javascript" src="lib/autocombo/autocombo.js"></script>
<form action="" method="get" name="xRekapitulasi">
开发者ID:abbeet,项目名称:server39,代码行数:31,代码来源:potongan.php
示例17: __init
function __init()
{
global $userdata, $username;
global $user_id, $log_id;
global $view, $hours;
global $Y, $m;
$userdata = unserialize($_SESSION['i3t']);
$user_id = $userdata['user_id'];
$view = $userdata['view'] ? true : false;
$username = $userdata['username'];
$hours = $userdata['hours'];
if (!$view) {
$log_id = update_log($user_id);
$_SESSION['i3t'] = serialize(array('user_id' => $user_id, 'username' => $username, 'hours' => $hours, 'log_id' => $log_id, 'view' => $view));
}
if (isset($_GET['Y']) && is_numeric($_GET['Y'])) {
$Y = $_GET['Y'];
} else {
$Y = date('Y');
}
if (isset($_GET['m']) && $_GET['m'] >= 1 && $_GET['m'] <= 12) {
$m = $_GET['m'];
} else {
$m = date('m');
}
}
开发者ID:joksnet,项目名称:php-old,代码行数:26,代码来源:i3t.php
示例18: gotoindex
if (!isset($_SESSION['id']) || !isset($_SESSION['ipaddress'])) {
gotoindex();
}
check_login();
if (!isset($_GET['id']) || !isset($_GET['ans'])) {
exit(0);
}
include "header.php";
$q_id = $_GET['id'];
$ans = $_GET['ans'];
$m_id = $_SESSION['id'];
if (update_answer($m_id, $q_id, $ans) != false) {
$answer = get_answer($ans);
$q = pg_fetch_assoc($answer, 0);
$ans = getAnswer($q['answer']);
update_log($m_id, $q['answer']);
print "結果は{$ans}です。";
}
include "footer.php";
function get_answer($id)
{
$db = new mydb();
$query = "select * from choices where id = \$1";
$result = $db->query($query, array($id), "getans");
return $result;
}
function update_answer($m_id, $q_id, $answer)
{
$db = new mydb();
$query = "insert into answer (m_id, q_id, answer) values(\$1, \$2, \$3)";
$result = $db->query($query, array($m_id, $q_id, $answer));
开发者ID:ryucd,项目名称:Shindan,代码行数:31,代码来源:answer.php
示例19: checkauthentication
checkauthentication();
$table = "m_ikk_kegiatan";
$field = get_field($table);
$p = $_GET['p'];
$form = $_POST['form'];
$q = $_POST['q'];
$xmenu_p = xmenu_id($p);
$p_next = $xmenu_p->parent;
if (isset($form)) {
$sql = sql_delete($table, $field[0], $q);
$rs = mysql_query($sql);
if ($rs) {
update_log($sql, $table, 1);
$_SESSION['errmsg'] = "Hapus data berhasil.";
} else {
update_log($sql, $table, 0);
$_SESSION['errmsg'] = "Hapus data gagal!";
}
?>
<meta http-equiv="refresh" content="0;URL=index.php?p=<?php
echo $p_next;
?>
"><?php
exit;
} else {
$value = get_value($table, $field, "id='" . $_GET['q'] . "'");
}
?>
<table width="551" cellspacing="1" class="admintable">
开发者ID:abbeet,项目名称:server39,代码行数:31,代码来源:ikk_kegiatan_del.php
示例20: die
} else {
if ($_FILES['file']['error'] == 1) {
die("Die Datei ist zu groß!");
}
}
}
if (isset($_POST["pasteit"]) && $_POST["text"] != "") {
$name = date("Y-m-d_His") . ".txt";
$file = fopen(PATH . DATA . $name, "w");
fwrite($file, $_POST["text"]);
fclose($file);
update_log($name);
header("Location: ." . DATA . $name);
}
if (isset($_SESSION["password"]) && $_SESSION["password"] == PASSWORD && isset($_GET["delete"]) && is_file(PATH . DATA . $_GET["delete"])) {
update_log($_GET["delete"], "deleted");
unlink(PATH . DATA . $_GET["delete"]);
}
if (is_dir(PATH . DATA)) {
$handle = opendir(PATH . DATA);
while (($file = readdir($handle)) !== false) {
if ($file != '.' && $file != '..' && is_file($path = PATH . DATA . '/' . $file)) {
$entry = array('filename' => $file, 'dirpath' => PATH . DATA);
$entry['modtime'] = filemtime($path);
$entry['realsize'] = $entry['size'] = filesize($path);
for ($i = 0; $entry['size'] / 1024 >= 1; $i++) {
$entry['size'] = $entry['size'] / 1024;
}
$entry['size_extension'] = $sizes[$i];
if (class_exists("finfo")) {
$finfo = new finfo(FILEINFO_MIME);
开发者ID:sirdiego,项目名称:fileman,代码行数:31,代码来源:index.php
注:本文中的update_log函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论