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


PHP validate_security函数代码示例

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


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

示例1: btn_delete

 function btn_delete($id = 0)
 {
     global $db, $messageStack;
     validate_security($this->security_id, 4);
     // OK to delete
     $result = $db->Execute("select description from " . $this->db_table . " where kt_id = '" . $id . "'");
     $db->Execute("delete from " . $this->db_table . " where kt_id = '" . $id . "'");
     gen_add_audit_log(SETUP_TAX_AUTHS_LOG . TEXT_DELETE, $result->fields['description']);
     return true;
 }
开发者ID:siwiwit,项目名称:PhreeBooksERP,代码行数:10,代码来源:known_transactions.php

示例2: btn_delete

 function btn_delete($id = 0)
 {
     global $db, $messageStack;
     validate_security($this->security_id, 4);
     // Don't allow delete if there is account activity for this account
     $sql = "select max(debit_amount) as debit, max(credit_amount) as credit, max(beginning_balance) as beg_bal \n\t\tfrom " . TABLE_CHART_OF_ACCOUNTS_HISTORY . " where account_id = '" . $this->gl_acct_id . "'";
     $result = $db->Execute($sql);
     if ($result->fields['debit'] != 0 || $result->fields['credit'] != 0 || $result->fields['beg_bal'] != 0) {
         $messageStack->add(GL_ERROR_CANT_DELETE, 'error');
         return false;
     }
     // OK to delete
     $result = $db->Execute("select description from " . $this->db_table . " where till_id = '" . $id . "'");
     $db->Execute("delete from " . $this->db_table . " where till_id = '" . $id . "'");
     gen_add_audit_log(SETUP_TAX_AUTHS_LOG . TEXT_DELETE, $result->fields['description']);
     return true;
 }
开发者ID:siwiwit,项目名称:PhreeBooksERP,代码行数:17,代码来源:tills.php

示例3: array

         if ($_POST['crm_action'] != '' || $_POST['crm_note'] != '') {
             $sql_data_array = array('contact_id' => $cInfo->id, 'log_date' => $_POST['crm_date'], 'entered_by' => $_POST['crm_rep_id'], 'action' => $_POST['crm_action'], 'notes' => db_prepare_input($_POST['crm_note']));
             db_perform(TABLE_CONTACTS_LOG, $sql_data_array, 'insert');
         }
         $_REQUEST['action'] = 'main';
         break;
     }
     $_REQUEST['action'] = 'edit';
     break;
 case 'edit':
 case 'properties':
     $cInfo->getContact();
     break;
 case 'delete':
 case 'crm_delete':
     validate_security($security_level, 4);
     $short_name = gen_get_contact_name($cInfo->id);
     $temp = $cInfo->delete();
     if ($temp == true) {
         gen_add_audit_log(TEXT_CONTACTS . '-' . TEXT_DELETE . '-' . constant('ACT_' . strtoupper($type) . '_TYPE_NAME'), $short_name);
     } else {
         $error = $messageStack->add($temp, 'error');
     }
     break;
 case 'download':
     $cID = db_prepare_input($_POST['id']);
     $imgID = db_prepare_input($_POST['rowSeq']);
     $filename = 'contacts_' . $cID . '_' . $imgID . '.zip';
     if (file_exists(CONTACTS_DIR_ATTACHMENTS . $filename)) {
         require_once DIR_FS_MODULES . 'phreedom/classes/backup.php';
         $backup = new backup();
开发者ID:siwiwit,项目名称:PhreeBooksERP,代码行数:31,代码来源:pre_process.php


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