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


PHP add_system_log函数代码示例

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


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

示例1: addslashes

$introduceInfo = addslashes($_POST['introduceInfo']);
$select = "select name from mall where id='{$mall_id}'";
$result = mysql_query($select);
$row = mysql_fetch_array($result);
$mall_name = $row['name'];
$time = time();
$insert = "insert into shop(name,detail,mall_id,mall_name,time) \n\tvalues('{$name}','{$introduceInfo}','{$mall_id}','{$mall_name}','{$time}')";
if (mysql_query($insert)) {
    $shop_id = mysql_insert_id();
    //print_r($_POST["pics"]);
    for ($i = 0; $i < count($_POST["pics"]); ++$i) {
        $pics = $_POST["pics"][$i];
        $insert_shop_pic = "insert into shop_pictures(shop_id,pic_url,time) values('{$shop_id}','{$_POST['pics'][$i]}','{$time}')";
        mysql_query($insert_shop_pic);
        if ($i == 0) {
            $pic_id = mysql_insert_id();
            $update = "update shop set picid={$pic_id} where id={$shop_id}";
            mysql_query($update);
        }
    }
    $content = "Added a shop, shop name is" . $name . ", store Numbers is" . $shop_id . ", and belongs to shopping is" . $mall_name . ",shop's profile" . $introduceInfo;
    if (add_system_log($content)) {
        echo "<script>alert('Add successful!');window.location.href='check_shop.php';</script>";
    } else {
        echo "<script>alert('Add failure,please add again!');window.location.href='check_shop.php';</script>";
    }
} else {
    echo "<script>alert('Add failure,please add again!');window.location.href='check_shop.php';</script>";
    echo mysql_error();
}
//print_r($_POST);
开发者ID:water940729,项目名称:demo,代码行数:31,代码来源:add_shop_do.php

示例2:

<?php

require "../../conn/conn.php";
require "../system_manage/add_system_log.php";
//$sql="delete from floorManage"
$id = $_POST["id"];
$sql = "delete from super_floorManage where id={$id}";
if (mysql_query($sql)) {
    $content = "删除了超市楼层,楼层编号为" . $id;
    if (add_system_log($content) == 1) {
        echo "删除成功";
        //echo $content;
    } else {
        echo "删除失败";
        //echo "<script>alert('修改失败!');window.location.href='edit_manage_account.php';</script>";
        //echo $content;
        //echo add_system_log($content);
    }
    //echo"删除成功";
} else {
    echo "删除失败";
}
开发者ID:htom78,项目名称:project,代码行数:22,代码来源:delete_floor.php

示例3: mysql_query

<?php 
require_once '../../conn/conn.php';
require "../system_manage/add_system_log.php";
$shop_id = $_POST['shop_id'];
$delete_shop = "delete from shop where id={$shop_id}";
$delete_shop_goods = "delete from goods where shop_id={$shop_id}";
$delete_info = "delete from goods_pictures where goods_id={$goods_id}";
$sql = "select name from shop where id={$shop_id}";
$result = mysql_query($sql);
$row = mysql_fetch_array($result);
$name = $row["name"];
if (mysql_query($delete_shop) && mysql_query($delete_shop_goods)) {
    $conn = "删除了店铺:{$name}";
    if (add_system_log($conn)) {
        echo 1;
    } else {
        echo "-1";
    }
} else {
    echo "-1";
}
开发者ID:htom78,项目名称:project,代码行数:21,代码来源:delete_shop_do.php

示例4: trim

<?php

require "../../conn/conn.php";
require "../system_manage/add_system_log.php";
//print_r($_POST);
//echo "11";
$keyword = $_POST["floor_name"];
$weight = trim($_POST["weight"]);
if (empty($weight)) {
    $weight = 1;
}
$time = time();
$role = $_SESSION["mall_id"];
$sql = "insert into keyword_manage(keyword,weight,time,role) values('{$keyword}',{$weight},{$time},{$role})";
$content = "添加了一个关键词,关键词名字" . $keyword;
if (mysql_query($sql) && add_system_log($content) == 1) {
    $url = "keyword_manage.php";
    echo "<script>alert('添加成功!');window.location.href='" . $url . "';</script>";
} else {
    $url = "add_keyword.php";
    echo "<script>alert('添加失败,请重新添加!');window.location.href='" . $url . "';</script>";
}
//echo $sql;
//echo $content;
开发者ID:htom78,项目名称:project,代码行数:24,代码来源:add_keyword_do.php

示例5: json_encode

        echo json_encode(array('status' => 1, 'data' => $data, 'constr' => $conStr, 'headStr' => '此分类下 总计: ' . $total . '个订单'));
    } else {
        echo json_encode(array('status' => 0));
        exit;
    }
} else {
    if ($action == 'delete') {
        if (isset($_POST['id'])) {
            $id = $_POST['id'];
        } else {
            exit(json_encode(array('status' => 0)));
        }
        $sql = "delete from {$tableName} where id=" . $id;
        if (mysql_query($sql)) {
            echo json_encode(array('status' => 1));
            add_system_log('删除了订单 ID=' . $id);
        } else {
            echo json_encode(array('status' => 0));
        }
    } else {
        if ($action == 'changeStatus') {
            if (isset($_POST['id'])) {
                $id = $_POST['id'];
            } else {
                exit(json_encode(array('status' => 0)));
            }
            $sql = "select ordstatus,mall_id,shop_id from {$tableName} where id={$id}";
            $res = mysql_fetch_row(mysql_query($sql));
            if ($res[1] != $mallId || $res[2] != 0) {
                exit(json_encode(array('status' => 0)));
            }
开发者ID:water940729,项目名称:demo,代码行数:31,代码来源:orderManageController.php

示例6: exit

                    exit(json_encode(array('status' => 1)));
                    add_system_log('修改' . $id . '的提现状态');
                } else {
                    exit(json_encode(array('status' => 0)));
                }
            }
            exit(json_encode(array('status' => 1)));
            add_system_log('修改' . $id . '的提现状态');
        } else {
            echo json_encode(array('status' => 0));
        }
    } else {
        if ($action == 'reDrow') {
            if (isset($_POST['id'])) {
                $id = $_POST['id'];
            } else {
                exit(json_encode(array('status' => 0)));
            }
            $sql = "select status,withdrawMoney,mallId from {$tableName} where id = {$id} ";
            $res = mysql_fetch_row(mysql_query($sql));
            $sql = "update {$tableName} set status = 4 where id=" . $id;
            if (mysql_query($sql)) {
                mysql_query('update mall set useMoney = useMoney +' . $res[1] . ' where id=' . $res[2]);
                echo json_encode(array('status' => 1));
                add_system_log('驳回了' . $id . '的提现请求');
            } else {
                echo json_encode(array('status' => 0));
            }
        }
    }
}
开发者ID:htom78,项目名称:project,代码行数:31,代码来源:financeManageController.php

示例7: isset

        $content = isset($_POST['content']) ? $_POST['content'] : 0;
        $sql = 'select catId from msgModule where id=' . $id;
        $res = mysql_fetch_row(mysql_query($sql));
        if ($res[0] == 0) {
            $content = strip_tags($content);
        }
        $sql = 'update msgModule set msgContext = "' . addslashes($content) . '"  where id=' . $id;
        if (mysql_query($sql)) {
            echo json_encode(array('status' => 1));
            add_system_log('修改了模板id' . $_POST['id']);
        } else {
            echo mysql_error();
            echo json_encode(array('status' => 0));
        }
    } else {
        if ($action == 'use') {
            $id = isset($_POST['id']) ? $_POST['id'] : 0;
            $sql = 'select isUse from msgModule where id=' . $id;
            $res = mysql_fetch_array(mysql_query($sql));
            $end = intval(!$res[0]);
            $sql = 'update msgModule set isUse = ' . $end . ' where id=' . $id;
            if (mysql_query($sql)) {
                add_system_log('修改了模板id' . $_POST['id']);
                echo json_encode(array('status' => 1, 'state' => $end));
            } else {
                echo mysql_error();
                echo json_encode(array('status' => 0));
            }
        }
    }
}
开发者ID:htom78,项目名称:project,代码行数:31,代码来源:msgManageController.php


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