當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。