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


PHP save_log函数代码示例

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


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

示例1: foreverdelete

 public function foreverdelete()
 {
     //彻底删除指定记录
     $ajax = intval($_REQUEST['ajax']);
     $id = $_REQUEST['id'];
     $ecv_type_id = 0;
     if (isset($id)) {
         $condition = array('id' => array('in', explode(',', $id)));
         $rel_data = M(MODULE_NAME)->where($condition)->findAll();
         foreach ($rel_data as $data) {
             $info[] = $data['sn'];
             $ecv_type_id = $data['ecv_type_id'];
         }
         if ($info) {
             $info = implode(",", $info);
         }
         $list = M(MODULE_NAME)->where($condition)->delete();
         if ($list !== false) {
             M("EcvType")->where("id=" . $ecv_type_id)->setField("gen_count", M("Ecv")->where("ecv_type_id=" . $ecv_type_id)->count());
             save_log($info . l("FOREVER_DELETE_SUCCESS"), 1);
             $this->success(l("FOREVER_DELETE_SUCCESS"), $ajax);
         } else {
             save_log($info . l("FOREVER_DELETE_FAILED"), 0);
             $this->error(l("FOREVER_DELETE_FAILED"), $ajax);
         }
     } else {
         $this->error(l("INVALID_OPERATION"), $ajax);
     }
 }
开发者ID:dalinhuang,项目名称:zsh_business,代码行数:29,代码来源:EcvAction.class.php

示例2: delete

 public function delete()
 {
     $id = intval($_REQUEST['id']);
     $tid = intval($_REQUEST['tid']);
     $data = M("TopicImage")->getById($id);
     if (!$data) {
         $this->ajaxReturn(l("IMAGE_NOT_EXIST"), "", 0);
     }
     $info = $data['topic_id'] . l("TOPIC_IMAGE");
     //		@unlink(APP_ROOT_PATH.$data['path']);
     //		@unlink(APP_ROOT_PATH.$data['o_path']);
     $list = M("TopicImage")->where("id=" . $id)->delete();
     if ($list !== false) {
         $Model = new Model();
         $img_array = $Model->query("select path,o_path,width,height,id,name from " . DB_PREFIX . "topic_image where topic_id=" . $tid);
         $count_img = count($img_array);
         if ($count_img > 0) {
             $is_img = 1;
         } else {
             $is_img = 0;
         }
         $img_cache = serialize($img_array);
         $Model->query("update " . DB_PREFIX . "topic set image_list = '" . $img_cache . "' ,has_img=" . $is_img . " ,image_count=" . $count_img . " where id = " . $tid);
         save_log($info . l("DELETE_SUCCESS"), 0);
         $this->ajaxReturn("", "", 1);
     } else {
         save_log($info . l("删除图片失败"), 0);
         $this->error(l("DELETE_FAILED"), $ajax);
     }
 }
开发者ID:macall,项目名称:jsd,代码行数:30,代码来源:TopicImageAction.class.php

示例3: delete

 public function delete($id)
 {
     $this->user->soft_delete($id);
     save_log('Excluiu usuário id: ' . $id);
     flashdata('Usuário excluído com Sucesso!');
     redirect('app/users');
 }
开发者ID:rogerioleal1,项目名称:ci_base,代码行数:7,代码来源:Users.php

示例4: update

 public function update()
 {
     //$data = M(MODULE_NAME)->create ();
     $data = array();
     $data['id'] = intval($_REQUEST['id']);
     $data['name'] = strim($_REQUEST['name']);
     //$data['content'] = $_REQUEST['content'];
     $data['content'] = stripslashes($_REQUEST['content']);
     $data['is_html'] = intval($_REQUEST['is_html']);
     $return = array('info' => '', 'status' => '0');
     if ($data['name'] == '' || $data['id'] == 0) {
         $info = l("SELECT_MSG_TPL");
         header("Content-Type:text/html; charset=utf-8");
         echo $info;
     }
     $log_info = $data['name'];
     // 更新数据
     $list = M(MODULE_NAME)->save($data);
     if (false !== $list) {
         //成功提示
         save_log($log_info . L("UPDATE_SUCCESS"), 1);
         $info = '"' . L("LANG_" . $data['name']) . '"模板' . L("UPDATE_SUCCESS");
         $return['status'] = 1;
         header("Content-Type:text/html; charset=utf-8");
         echo $info;
     } else {
         //错误提示
         save_log($log_info . L("UPDATE_FAILED"), 0);
         $info = L("LANG_" . $data['name']) . "模板" . L("UPDATE_FAILED");
         $return['status'] = 0;
         header("Content-Type:text/html; charset=utf-8");
         echo $info;
     }
 }
开发者ID:centaurustech,项目名称:crowdfunding-9,代码行数:34,代码来源:MsgTemplateAction.class.php

示例5: delete

 public function delete()
 {
     //彻底删除指定记录
     $ajax = intval($_REQUEST['ajax']);
     $id = $_REQUEST['id'];
     if (isset($id)) {
         $condition = array('id' => array('in', explode(',', $id)));
         $rel_data = M(MODULE_NAME)->where($condition)->findAll();
         $list = M(MODULE_NAME)->where($condition)->delete();
         foreach ($rel_data as $data) {
             $info[] = "[单号:" . $data['notice_sn'] . "]";
         }
         if ($info) {
             $info = implode(",", $info);
         }
         if ($list !== false) {
             save_log($info . "成功删除", 1);
             $this->success("成功删除", $ajax);
         } else {
             save_log($info . "删除出错", 0);
             $this->error("删除出错", $ajax);
         }
     } else {
         $this->error(l("INVALID_OPERATION"), $ajax);
     }
 }
开发者ID:noikiy,项目名称:yisheji,代码行数:26,代码来源:PaymentNoticeAction.class.php

示例6: update

 public function update()
 {
     $conf_res = M("Conf")->where("is_effect = 1 and is_conf = 1")->findAll();
     foreach ($conf_res as $k => $v) {
         conf($v['name'], $_REQUEST[$v['name']]);
         if ($v['name'] == 'URL_MODEL' && $v['value'] != $_REQUEST[$v['name']]) {
             clear_dir_file(get_real_path() . "public/runtime/app/data_caches/");
             clear_dir_file(get_real_path() . "public/runtime/app/tpl_caches/");
             clear_dir_file(get_real_path() . "public/runtime/app/tpl_compiled/");
             clear_dir_file(get_real_path() . "public/runtime/app/data_caches/");
             clear_dir_file(get_real_path() . "public/runtime/data/page_static_cache/");
             clear_dir_file(get_real_path() . "public/runtime/data/dynamic_avatar_cache/");
         }
     }
     //开始写入配置文件
     $sys_configs = M("Conf")->findAll();
     $config_str = "<?php\n";
     $config_str .= "return array(\n";
     foreach ($sys_configs as $k => $v) {
         $config_str .= "'" . $v['name'] . "'=>'" . addslashes($v['value']) . "',\n";
     }
     $config_str .= ");\n ?>";
     $filename = get_real_path() . "public/sys_config.php";
     if (!($handle = fopen($filename, 'w'))) {
         $this->error(l("OPEN_FILE_ERROR") . $filename);
     }
     if (fwrite($handle, $config_str) === FALSE) {
         $this->error(l("WRITE_FILE_ERROR") . $filename);
     }
     fclose($handle);
     save_log(l("CONF_UPDATED"), 1);
     //clear_cache();
     write_timezone();
     $this->success(L("UPDATE_SUCCESS"));
 }
开发者ID:BruceJi,项目名称:fanwe,代码行数:35,代码来源:ConfAction.class.php

示例7: all_reg_func

function all_reg_func($post_data, $session_data)
{
    if ($post_data['load'] == 'Clients') {
        save_log('load table Clients', $session_data['user']);
        $all_reg = get_all_reg('Clients', 'id');
    }
    if ($post_data['load'] == 'ClientsGarage') {
        save_log('load table ClientsGarage', $session_data['user']);
        $all_reg = get_all_reg('ClientsGarage', 'id');
    }
    if ($post_data['load'] == 'ClientsLab') {
        save_log('load table ClientsLab', $session_data['user']);
        $all_reg = get_all_reg('ClientsLab', 'id');
    }
    if ($post_data['load'] == 'ClientsFreddy') {
        save_log('load table ClientsFreddy', $session_data['user']);
        $all_reg = get_all_reg('ClientsFreddy', 'id');
    }
    if ($post_data['load'] == 'ClientsRed') {
        save_log('load table red', $session_data['user']);
        $all_reg = get_all_reg('ClientsRed', 'id');
    }
    if ($post_data['load'] == 'Clients007') {
        save_log('load table Clients007', $session_data['user']);
        $all_reg = get_all_reg('Clients007', 'id');
    }
    if ($post_data['load'] == 'ClientsBunker') {
        save_log('load table Clients007', $session_data['user']);
        $all_reg = get_all_reg('ClientsBunker', 'id');
    }
    return $all_reg;
}
开发者ID:lexus65,项目名称:sourceitproj,代码行数:32,代码来源:functions.php

示例8: delete

 public function delete()
 {
     //彻底删除指定记录
     $ajax = intval($_REQUEST['ajax']);
     $id = $_REQUEST['id'];
     if (isset($id)) {
         $condition = array('id' => array('in', explode(',', $id)));
         $rel_data = M(MODULE_NAME)->where($condition)->findAll();
         foreach ($rel_data as $data) {
             $info[] = "[" . $data['deal_name'] . $data['deal_price'] . "支持人:" . $data['user_name'] . "状态:" . $data['order_status'] . "]";
         }
         if ($info) {
             $info = implode(",", $info);
         }
         $list = M(MODULE_NAME)->where($condition)->delete();
         if ($list !== false) {
             //					$deal_id=$GLOBALS['db']->getOne("select deal_id from  ".DB_PREFIX."deal_order where id=$id");
             //					syn_deal($deal_id);
             save_log($info . "成功删除", 1);
             $this->success("成功删除", $ajax);
         } else {
             save_log($info . "删除出错", 0);
             $this->error("删除出错", $ajax);
         }
     } else {
         $this->error(l("INVALID_OPERATION"), $ajax);
     }
 }
开发者ID:myjavawork,项目名称:sanxin-fangwei,代码行数:28,代码来源:DealOrderAction.class.php

示例9: foreverdelete

 public function foreverdelete()
 {
     //彻底删除指定记录
     $ajax = intval($_REQUEST['ajax']);
     $id = $_REQUEST['id'];
     if (isset($id)) {
         $condition = array('id' => array('in', explode(',', $id)));
         $rel_data = M(MODULE_NAME)->where($condition)->findAll();
         foreach ($rel_data as $data) {
             $info[] = $data['id'];
         }
         if ($info) {
             $info = implode(",", $info);
         }
         $list = M(MODULE_NAME)->where($condition)->delete();
         if ($list !== false) {
             //将已返利的数字减一
             foreach ($rel_data as $data) {
                 M("User")->setDec('referral_count', "id=" . $data['rel_user_id']);
                 // 用户返利次数减一
             }
             save_log($info . l("FOREVER_DELETE_SUCCESS"), 1);
             $this->success(l("FOREVER_DELETE_SUCCESS"), $ajax);
         } else {
             save_log($info . l("FOREVER_DELETE_FAILED"), 0);
             $this->error(l("FOREVER_DELETE_FAILED"), $ajax);
         }
     } else {
         $this->error(l("INVALID_OPERATION"), $ajax);
     }
 }
开发者ID:dalinhuang,项目名称:zsh_business,代码行数:31,代码来源:ReferralsAction.class.php

示例10: foreverdelete

 public function foreverdelete()
 {
     //彻底删除指定记录
     $ajax = intval($_REQUEST['ajax']);
     $id = $_REQUEST['id'];
     if (isset($id)) {
         $condition = array('id' => array('in', explode(',', $id)));
         $rel_data = M(MODULE_NAME)->where($condition)->findAll();
         foreach ($rel_data as $data) {
             $info[] = $data['name'];
         }
         if ($info) {
             $info = implode(",", $info);
         }
         $list = M(MODULE_NAME)->where($condition)->delete();
         if ($list !== false) {
             clear_auto_cache("cache_shop_cate");
             save_log($info . l("FOREVER_DELETE_SUCCESS"), 1);
             $this->success(l("FOREVER_DELETE_SUCCESS"), $ajax);
         } else {
             save_log($info . l("FOREVER_DELETE_FAILED"), 0);
             $this->error(l("FOREVER_DELETE_FAILED"), $ajax);
         }
     } else {
         $this->error(l("INVALID_OPERATION"), $ajax);
     }
 }
开发者ID:dalinhuang,项目名称:zsh_business,代码行数:27,代码来源:FilterAction.class.php

示例11: update_debit

 public function update_debit()
 {
     $borrow_amount_cfg = array();
     foreach ($_REQUEST["borrow_amount_cfg"] as $k => $v) {
         if ($v != "") {
             $borrow_amount_cfg[] = htmlspecialchars(addslashes(trim($v)));
         }
     }
     $data = array();
     $data["borrow_amount_cfg"] = serialize($borrow_amount_cfg);
     $data["loantype"] = intval($_REQUEST["loantype"]);
     $data["services_fee"] = floatval($_REQUEST["services_fee"]);
     $data["manage_fee"] = floatval($_REQUEST["manage_fee"]);
     $data["manage_impose_fee_day1"] = strim($_REQUEST["manage_impose_fee_day1"]);
     $data["manage_impose_fee_day2"] = strim($_REQUEST["manage_impose_fee_day2"]);
     $data["impose_fee_day1"] = strim($_REQUEST["impose_fee_day1"]);
     $data["impose_fee_day2"] = strim($_REQUEST["impose_fee_day2"]);
     $data["rate_cfg"] = intval($_REQUEST["rate_cfg"]);
     $data["enddate"] = intval($_REQUEST["enddate"]);
     $data["first_relief"] = floatval($_REQUEST["first_relief"]);
     $count = $GLOBALS["db"]->getOne("select count(*) from " . DB_PREFIX . "debit_conf");
     if ($count == 0) {
         $GLOBALS['db']->autoExecute(DB_PREFIX . "debit_conf", $data);
     } else {
         $GLOBALS['db']->autoExecute(DB_PREFIX . "debit_conf", $data, "UPDATE", " 1=1 ");
     }
     save_log(l("DEBIT_UPDATED"), 1);
     $this->success(L("UPDATE_SUCCESS"));
 }
开发者ID:eliu03,项目名称:fanweP2P,代码行数:29,代码来源:DebitAction.class.php

示例12: foreverdelete

 public function foreverdelete()
 {
     //删除指定记录
     $ajax = intval($_REQUEST['ajax']);
     $id = $_REQUEST['id'];
     if (!empty($id)) {
         $name = $this->getActionName();
         $model = D($name);
         $pk = $model->getPk();
         $condition = array($pk => array('in', explode(',', $id)));
         $res = $model->where($condition)->findAll();
         if (false !== $model->where($condition)->delete()) {
             foreach ($res as $k => $v) {
                 $count = $model->where("dp_id=" . $v['dp_id'])->count();
                 M("SupplierLocationDp")->where("id=" . $v['dp_id'])->setField("reply_count", $count);
             }
             save_log($res . l("FOREVER_DELETE_SUCCESS"), 1);
             $this->success(l("FOREVER_DELETE_SUCCESS"), $ajax);
         } else {
             save_log($res . l("FOREVER_DELETE_FAILED"), 0);
             $this->error(l("FOREVER_DELETE_FAILED"), $ajax);
         }
     } else {
         $this->error(l("INVALID_OPERATION"), $ajax);
     }
 }
开发者ID:dalinhuang,项目名称:zsh_business,代码行数:26,代码来源:SupplierLocationDpReplyAction.class.php

示例13: delete

 public function delete()
 {
     //彻底删除指定记录
     $ajax = intval($_REQUEST['ajax']);
     $id = $_REQUEST['id'];
     if (isset($id)) {
         $condition = array('id' => array('in', explode(',', $id)));
         $rel_data = M(MODULE_NAME)->where($condition)->count();
         $list = M(MODULE_NAME)->where($condition)->delete();
         if ($list !== false) {
             foreach ($rel_data as $k => $v) {
                 if ($v['log_id'] == 0) {
                     $GLOBALS['db']->query("update " . DB_PREFIX . "deal set comment_count = comment_count - 1 where id = " . $v['deal_id']);
                 }
             }
             save_log($info . "成功删除", 1);
             $this->success("成功删除", $ajax);
         } else {
             save_log($info . "删除出错", 0);
             $this->error("删除出错", $ajax);
         }
     } else {
         $this->error(l("INVALID_OPERATION"), $ajax);
     }
 }
开发者ID:bharatthakkar,项目名称:stock-crowd-funding-system,代码行数:25,代码来源:DealCommentAction.class.php

示例14: refuse

 public function refuse()
 {
     $id = intval($_REQUEST['id']);
     $ajax = intval($_REQUEST['ajax']);
     $info = "活动报名ID:" . $id;
     require_once APP_ROOT_PATH . "system/model/event.php";
     refuse_event_submit($id);
     save_log($info . "报名审核被拒绝", 1);
     $this->success("操作成功");
 }
开发者ID:macall,项目名称:jsd,代码行数:10,代码来源:EventSubmitAction.class.php

示例15: write_comment

function write_comment()
{
    $info = load_log();
    $tag = isset($_GET["tag"]) ? $_GET["tag"] : "";
    $memo = isset($_GET["memo"]) ? $_GET["memo"] : "";
    if (empty($info[$tag]["comment"])) {
        $info[$tag]["comment"] = array();
    }
    $info[$tag]["comment"][] = $memo;
    save_log($info);
    header("location:" . $_SERVER["SCRIPT_NAME"]);
}
开发者ID:na3ksg,项目名称:ReadPHP,代码行数:12,代码来源:weather-memo.php


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