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


PHP simbio_dbop::insert方法代码示例

本文整理汇总了PHP中simbio_dbop::insert方法的典型用法代码示例。如果您正苦于以下问题:PHP simbio_dbop::insert方法的具体用法?PHP simbio_dbop::insert怎么用?PHP simbio_dbop::insert使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在simbio_dbop的用法示例。


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

示例1: valid

 /**
  * Method to check user validity
  *
  * @param   object  $obj_db
  * @return  void
  */
 public function valid($obj_db)
 {
     global $sysconf;
     $this->obj_db = $obj_db;
     $_check_login = call_user_func(array($this, $this->auth_method . 'Login'));
     // check if the user exist in database
     if (!$_check_login) {
         return false;
     }
     // fill all sessions var
     $_SESSION['mid'] = $this->user_info['member_id'];
     $_SESSION['m_name'] = $this->user_info['member_name'];
     $_SESSION['m_email'] = $this->user_info['member_email'];
     $_SESSION['m_institution'] = $this->user_info['inst_name'];
     $_SESSION['m_logintime'] = time();
     $_SESSION['m_expire_date'] = $this->user_info['expire_date'];
     $_SESSION['m_member_type_id'] = $this->user_info['member_type_id'];
     $_SESSION['m_member_type'] = $this->user_info['member_type_name'];
     $_SESSION['m_register_date'] = $this->user_info['register_date'];
     $_SESSION['m_membership_pending'] = intval($this->user_info['is_pending']) ? true : false;
     $_SESSION['m_is_expired'] = false;
     $_SESSION['m_mark_biblio'] = array();
     $_SESSION['m_can_reserve'] = $this->user_info['enable_reserve'];
     $_SESSION['m_reserve_limit'] = $this->user_info['reserve_limit'];
     // check member expiry date
     require_once SIMBIO . 'simbio_UTILS/simbio_date.inc.php';
     $_curr_date = date('Y-m-d');
     if (simbio_date::compareDates($this->user_info['expire_date'], $_curr_date) == $_curr_date) {
         $_SESSION['m_is_expired'] = true;
     }
     if ($sysconf['chat_system']['enabled'] and $sysconf['chat_system']['opac']) {
         if ($sysconf['chat_system']['vendors'] == 'freichat') {
             $_SESSION['chat_mid'] = mt_rand();
             $chatinfo['userid'] = $_SESSION['chat_mid'];
             $chatinfo['username'] = $_SESSION['m_name'];
             $chat_reg = new simbio_dbop($obj_db);
             $insert = $chat_reg->insert('chat_user', $chatinfo, TRUE);
         }
     }
     // update the last login time
     $obj_db->query("UPDATE member SET last_login='" . date("Y-m-d H:i:s") . "',\r\n            last_login_ip='" . $_SERVER['REMOTE_ADDR'] . "'\r\n            WHERE member_id='" . $this->user_info['member_id'] . "'");
     return true;
 }
开发者ID:bandaaceh,项目名称:slims8_akasia,代码行数:49,代码来源:member_logon.inc.php

示例2: VALUES

                 }
                 $dbs->query("INSERT INTO group_access VALUES ({$updateRecordID}, {$module}, 1, {$is_write})");
             }
         }
         // write log
         utility::writeLogs($dbs, 'staff', $_SESSION['uid'], 'system', $_SESSION['realname'] . ' update group data (' . $groupName . ')');
         utility::jsAlert(__('Group Data Successfully Updated'));
         echo '<script type="text/javascript">parent.setContent(\'mainContent\', parent.getPreviousAJAXurl(), \'post\');</script>';
     } else {
         utility::jsAlert(__('Group Data FAILED to Updated. Please Contact System Administrator') . "\nDEBUG : " . $sql_op->error);
     }
     exit;
 } else {
     /* INSERT RECORD MODE */
     // insert the data
     $insert = $sql_op->insert('user_group', $data);
     if ($insert) {
         $group_id = $dbs->insert_id;
         // set group privileges
         if (isset($_POST['read'])) {
             foreach ($_POST['read'] as $module) {
                 // check write privileges
                 $is_write = 0;
                 if (isset($_POST['write'])) {
                     foreach ($_POST['write'] as $module_write) {
                         if ($module_write == $module) {
                             $is_write = 1;
                         }
                     }
                 }
                 $dbs->query("INSERT INTO group_access VALUES ({$group_id}, {$module}, 1, {$is_write})");
开发者ID:edikriting,项目名称:SENAYAN-3-Stable,代码行数:31,代码来源:user_group.php

示例3: data

             }
         }
         // write log
         utility::writeLogs($dbs, 'staff', $_SESSION['uid'], 'membership', $_SESSION['realname'] . ' update member data (' . $memberName . ') with ID (' . $memberID . ')');
         echo '<script type="text/javascript">parent.setContent(\'mainContent\', parent.getPreviousAJAXurl(), \'post\');</script>';
     } else {
         utility::jsAlert(__('Member Data FAILED to Save/Update. Please Contact System Administrator') . "\nDEBUG : " . $sql_op->error);
     }
     exit;
 } else {
     /* INSERT RECORD MODE */
     if (!$mpasswd1 and !$mpasswd2) {
         $data['mpasswd'] = 'literal{NULL}';
     }
     // insert the data
     $insert = $sql_op->insert('member', $data);
     if ($insert) {
         utility::jsAlert(__('New Member Data Successfully Saved'));
         // upload status alert
         if (isset($upload_status)) {
             if ($upload_status == UPLOAD_SUCCESS) {
                 // write log
                 utility::writeLogs($dbs, 'staff', $_SESSION['uid'], 'membership', $_SESSION['realname'] . ' upload image file ' . $upload->new_filename);
                 utility::jsAlert(__('Image Uploaded Successfully'));
             } else {
                 // write log
                 utility::writeLogs($dbs, 'staff', $_SESSION['uid'], 'membership', 'ERROR : ' . $_SESSION['realname'] . ' FAILED TO upload image file ' . $upload->new_filename . ', with error (' . $upload->error . ')');
                 utility::jsAlert(__('Image FAILED to upload'));
             }
         }
         // write log
开发者ID:jgoegelein,项目名称:s3st13,代码行数:31,代码来源:index.php

示例4: substr

     $file_upload->setMaxSize($sysconf['max_upload'] * 1024);
     $file_upload->setUploadDir(REPO_BASE_DIR . DIRECTORY_SEPARATOR . str_replace('/', DIRECTORY_SEPARATOR, $file_dir));
     $file_upload_status = $file_upload->doUpload('file2attach');
     if ($file_upload_status === UPLOAD_SUCCESS) {
         $file_ext = substr($file_upload->new_filename, strrpos($file_upload->new_filename, '.') + 1);
         $fdata['uploader_id'] = $_SESSION['uid'];
         $fdata['file_title'] = $dbs->escape_string($title);
         $fdata['file_name'] = $dbs->escape_string($file_upload->new_filename);
         $fdata['file_url'] = $dbs->escape_string($url);
         $fdata['file_dir'] = $dbs->escape_string($file_dir);
         $fdata['file_desc'] = $dbs->escape_string(trim(strip_tags($_POST['fileDesc'])));
         $fdata['mime_type'] = $sysconf['mimetype'][$file_ext];
         $fdata['input_date'] = date('Y-m-d H:i:s');
         $fdata['last_update'] = $fdata['input_date'];
         // insert file data to database
         @$sql_op->insert('files', $fdata);
         $uploaded_file_id = $sql_op->insert_id;
         utility::writeLogs($dbs, 'staff', $_SESSION['uid'], 'bibliography', $_SESSION['realname'] . ' upload file (' . $file_upload->new_filename . ')');
     } else {
         echo '<script type="text/javascript">';
         echo 'alert(\'' . __('Upload FAILED! Forbidden file type or file size too big!') . '\');';
         echo 'self.close();';
         echo '</script>';
         die;
     }
 } else {
     if ($url && preg_match('@^(http|https|ftp|gopher):\\/\\/@i', $url)) {
         $fdata['uploader_id'] = $_SESSION['uid'];
         $fdata['file_title'] = $dbs->escape_string($title);
         $fdata['file_name'] = $dbs->escape_string($url);
         $fdata['file_url'] = $dbs->escape_string($fdata['file_name']);
开发者ID:slims,项目名称:s3st15_matoa,代码行数:31,代码来源:pop_attach.php

示例5: data

            $updateRecordID = (int) $_POST['updateRecordID'];
            // update the data
            $update = $sql_op->update('content', $data, 'content_id=' . $updateRecordID);
            if ($update) {
                // write log
                utility::writeLogs($dbs, 'staff', $_SESSION['uid'], 'system', $_SESSION['content_title'] . ' update content data (' . $data['content_title'] . ') with contentname (' . $data['contentname'] . ')');
                utility::jsAlert(__('Content data updated'));
                echo '<script type="text/javascript">parent.setContent(\'mainContent\', parent.getPreviousAJAXurl(), \'post\');</script>';
            } else {
                utility::jsAlert(__('Content data FAILED to update!') . "\nDEBUG : " . $sql_op->error);
            }
            exit;
        } else {
            /* INSERT RECORD MODE */
            // insert the data
            if ($sql_op->insert('content', $data)) {
                // write log
                utility::writeLogs($dbs, 'staff', $_SESSION['uid'], 'system', $_SESSION['realname'] . ' add new content (' . $data['content_title'] . ') with contentname (' . $data['contentname'] . ')');
                utility::jsAlert(__('Content data saved'));
                echo '<script type="text/javascript">parent.setContent(\'mainContent\', \'' . $_SERVER['PHP_SELF'] . '\', \'post\');</script>';
            } else {
                utility::jsAlert(__('Content data FAILED to save!') . "\n" . $sql_op->error);
            }
            exit;
        }
    }
    exit;
} else {
    if (isset($_POST['itemID']) and !empty($_POST['itemID']) and isset($_POST['itemAction'])) {
        if (!($can_read and $can_write)) {
            die;
开发者ID:slims,项目名称:s3st14,代码行数:31,代码来源:content.php

示例6: unset

        // remove input date
        unset($data['input_date']);
        // filter update record ID
        $updateRecordID = (int) $_POST['updateRecordID'];
        // update the data
        $update = $sql_op->update('mst_loan_rules', $data, 'loan_rules_id=' . $updateRecordID);
        if ($update) {
            utility::jsAlert(__('Loan Rules Successfully Updated'));
            echo '<script language="Javascript">parent.setContent(\'mainContent\', parent.getPreviousAJAXurl(), \'post\');</script>';
        } else {
            utility::jsAlert(__('Loan Rules FAILED to Updated. Please Contact System Administrator') . "\nDEBUG : " . $sql_op->error);
        }
        exit;
    } else {
        /* INSERT RECORD MODE */
        $insert = $sql_op->insert('mst_loan_rules', $data);
        if ($insert) {
            utility::jsAlert(__('New Loan Rules Successfully Saved'));
            echo '<script language="Javascript">parent.setContent(\'mainContent\', \'' . $_SERVER['PHP_SELF'] . '\', \'post\');</script>';
        } else {
            utility::jsAlert(__('Loan Rules FAILED to Save. Please Contact System Administrator') . "\n" . $sql_op->error);
        }
        exit;
    }
    exit;
} else {
    if (isset($_POST['itemID']) and !empty($_POST['itemID']) and isset($_POST['itemAction'])) {
        if (!($can_read and $can_write)) {
            die;
        }
        /* DATA DELETION PROCESS */
开发者ID:sulfan,项目名称:SENAYAN-3-Stable-jQuery,代码行数:31,代码来源:loan_rules.php

示例7: array

            $updateRecordID = $dbs->escape_string(trim($_POST['updateRecordID']));
            // update the data
            $update = $sql_op->update('mst_language', $data, 'language_id=\'' . $updateRecordID . '\'');
            if ($update) {
                utility::jsAlert(__('Language Data Successfully Updated'));
                // update language ID in biblio table to keep data integrity
                $sql_op->update('biblio', array('language_id' => $data['language_id']), 'language_id=\'' . $updateRecordID . '\'');
                echo '<script type="text/javascript">parent.setContent(\'mainContent\', parent.getPreviousAJAXurl(), \'post\');</script>';
            } else {
                utility::jsAlert(__('Language Data FAILED to Updated. Please Contact System Administrator') . "\nDEBUG : " . $sql_op->error);
            }
            exit;
        } else {
            /* INSERT RECORD MODE */
            // insert the data
            $insert = $sql_op->insert('mst_language', $data);
            if ($insert) {
                utility::jsAlert(__('New Language Data Successfully Saved'));
                echo '<script type="text/javascript">parent.setContent(\'mainContent\', \'' . $_SERVER['PHP_SELF'] . '\', \'post\');</script>';
            } else {
                utility::jsAlert(__('Language Data FAILED to Save. Please Contact System Administrator') . "\nDEBUG : " . $sql_op->error);
            }
            exit;
        }
    }
    exit;
} else {
    if (isset($_POST['itemID']) and !empty($_POST['itemID']) and isset($_POST['itemAction'])) {
        if (!($can_read and $can_write)) {
            die;
        }
开发者ID:edikriting,项目名称:SENAYAN-3-Stable,代码行数:31,代码来源:doc_language.php

示例8: unset

            unset($data['input_date']);
            // filter update record ID
            $updateRecordID = (int) $_POST['updateRecordID'];
            // update the data
            $update = $sql_op->update('mst_supplier', $data, 'supplier_id=' . $updateRecordID);
            if ($update) {
                utility::jsAlert(__('Supplier Data Successfully Updated'));
                echo '<script type="text/javascript">parent.setContent(\'mainContent\', parent.getPreviousAJAXurl(), \'post\');</script>';
            } else {
                utility::jsAlert(__('Supplier Data FAILED to Updated. Please Contact System Administrator') . "\nDEBUG : " . $error);
            }
            exit;
        } else {
            /* INSERT RECORD MODE */
            // insert the data
            $insert = $sql_op->insert('mst_supplier', $data);
            if ($insert) {
                utility::jsAlert(__('New Supplier Data Successfully Saved'));
                echo '<script type="text/javascript">parent.setContent(\'mainContent\', \'' . $_SERVER['PHP_SELF'] . '\', \'post\');</script>';
            } else {
                utility::jsAlert(__('Supplier Data FAILED to Save. Please Contact System Administrator') . "\nDEBUG : " . $sql_op->error);
            }
            exit;
        }
    }
    exit;
} else {
    if (isset($_POST['itemID']) and !empty($_POST['itemID']) and isset($_POST['itemAction'])) {
        if (!($can_read and $can_write)) {
            die;
        }
开发者ID:sulfan,项目名称:SENAYAN-3-Stable-jQuery,代码行数:31,代码来源:supplier.php

示例9: checkAuthor

     if (isset($_POST['authorID']) and !empty($_POST['authorID'])) {
         $data['author_id'] = $_POST['authorID'];
     } else {
         if ($author_name and empty($_POST['authorID'])) {
             // check author
             $author_id = checkAuthor($author_name, $_POST['type']);
             if ($author_id !== false) {
                 $data['author_id'] = $author_id;
             } else {
                 // adding new author
                 $author_data['author_name'] = $author_name;
                 $author_data['authority_type'] = $_POST['type'];
                 $author_data['input_date'] = date('Y-m-d');
                 $author_data['last_update'] = date('Y-m-d');
                 // insert new author to author master table
                 @$sql_op->insert('mst_author', $author_data);
                 $data['author_id'] = $sql_op->insert_id;
             }
         }
     }
     $data['level'] = intval($_POST['level']);
     if ($sql_op->insert('biblio_author', $data)) {
         echo '<script type="text/javascript">';
         echo 'alert(\'' . __('Author succesfully updated!') . '\');';
         echo 'parent.setIframeContent(\'authorIframe\', \'' . MODULES_WEB_ROOT_DIR . 'bibliography/iframe_author.php?biblioID=' . $data['biblio_id'] . '\');';
         echo '</script>';
     } else {
         utility::jsAlert(__('Author FAILED to Add. Please Contact System Administrator') . "\n" . $sql_op->error);
     }
 } else {
     if (isset($_POST['authorID']) and !empty($_POST['authorID'])) {
开发者ID:slims,项目名称:s3st15_matoa,代码行数:31,代码来源:pop_author.php

示例10: data

             utility::jsAlert(__('Item Data Successfully Updated'));
         }
         if ($in_pop_up) {
             echo '<script type="text/javascript">top.setIframeContent(\'itemIframe\', \'' . MODULES_WEB_ROOT_DIR . 'bibliography/iframe_item_list.php?biblioID=' . $data['biblio_id'] . '\');</script>';
             echo '<script type="text/javascript">top.closeHTMLpop();</script>';
         } else {
             echo '<script type="text/javascript">parent.$(\'#mainContent\').simbioAJAX(parent.jQuery.ajaxHistory[0].url);</script>';
         }
     } else {
         utility::jsAlert(__('Item Data FAILED to Save. Please Contact System Administrator') . "\nDEBUG : " . $sql_op->error);
     }
     exit;
 } else {
     /* INSERT RECORD MODE */
     // insert the data
     $insert = $sql_op->insert('item', $data);
     if ($insert) {
         // write log
         utility::writeLogs($dbs, 'staff', $_SESSION['uid'], 'bibliography', $_SESSION['realname'] . ' insert item data (' . $data['item_code'] . ') with title (' . $title . ')');
         utility::jsAlert(__('New Item Data Successfully Saved'));
         if ($in_pop_up) {
             echo '<script type="text/javascript">top.setIframeContent(\'itemIframe\', \'' . MODULES_WEB_ROOT_DIR . 'bibliography/iframe_item_list.php?biblioID=' . $data['biblio_id'] . '\');</script>';
             echo '<script type="text/javascript">top.closeHTMLpop();</script>';
         } else {
             echo '<script type="text/javascript">parent.$(\'#mainContent\').simbioAJAX(\'' . $_SERVER['PHP_SELF'] . '\');</script>';
         }
     } else {
         utility::jsAlert(__('Item Data FAILED to Save. Please Contact System Administrator') . "\nDEBUG : " . $sql_op->error);
     }
     exit;
 }
开发者ID:slims,项目名称:s3st15_matoa,代码行数:31,代码来源:item.php

示例11: trim

$stk_q = $dbs->query('SELECT * FROM stock_take WHERE is_active=1');
if ($stk_q->num_rows) {
    echo '<div class="errorBox">' . __('There is already stock taking proccess running!') . '</div>';
} else {
    // add new stock take
    if (isset($_POST['saveData']) and empty($_POST['name'])) {
        utility::jsAlert(__('Stock Take Name must be filled!'));
        exit;
    } else {
        if (isset($_POST['saveData']) and !empty($_POST['name'])) {
            $data['stock_take_name'] = trim($dbs->escape_string(strip_tags($_POST['name'])));
            $data['start_date'] = date('Y-m-d H:i:s');
            $data['init_user'] = $_SESSION['realname'];
            $data['is_active'] = 1;
            $sql_op = new simbio_dbop($dbs);
            if ($sql_op->insert('stock_take', $data)) {
                // get latest stock take id
                $stock_take_id = $sql_op->insert_id;
                // criteria
                $criteria = ' WHERE item_id IS NOT NULL ';
                // gmd
                if ($_POST['gmdID'] != '0') {
                    $criteria .= ' AND b.gmd_id=' . intval($_POST['gmdID']) . ' ';
                }
                // collection type
                if ($_POST['collTypeID'] != '0') {
                    $criteria .= ' AND i.coll_type_id=\'' . intval($_POST['collTypeID']) . '\' ';
                }
                // location
                if ($_POST['location'] != '0') {
                    $criteria .= ' AND i.location_id=\'' . $dbs->escape_string($_POST['location']) . '\' ';
开发者ID:sulfan,项目名称:SENAYAN-3-Stable-jQuery,代码行数:31,代码来源:init.php

示例12:

            // update the data
            $update = $sql_op->update('mst_member_type', $data, 'member_type_id=' . $updateRecordID);
            if ($update) {
                utility::jsAlert(__('Member Type Successfully Updated'));
                // update all member expire date
                @$dbs->query('UPDATE member AS m SET expire_date=DATE_ADD(register_date,INTERVAL ' . $data['member_periode'] . '  DAY)
                    WHERE member_type_id=' . $updateRecordID);
                echo '<script type="text/javascript">parent.$(\'#mainContent\').simbioAJAX(\'' . $_SERVER['PHP_SELF'] . '\');</script>';
            } else {
                utility::jsAlert(__('Member Type Data FAILED to Save/Update. Please Contact System Administrator') . "\nDEBUG : " . $sql_op->error);
            }
            exit;
        } else {
            /* INSERT RECORD MODE */
            // insert the data
            if ($sql_op->insert('mst_member_type', $data)) {
                utility::jsAlert(__('New Member Type Successfully Saved'));
                echo '<script type="text/javascript">parent.$(\'#mainContent\').simbioAJAX(\'' . $_SERVER['PHP_SELF'] . '\');</script>';
            } else {
                utility::jsAlert(__('Member Type Data FAILED to Save/Update. Please Contact System Administrator') . "\n" . $sql_op->error);
            }
            exit;
        }
    }
    exit;
} else {
    if (isset($_POST['itemID']) and !empty($_POST['itemID']) and isset($_POST['itemAction'])) {
        if (!($can_read and $can_write)) {
            die;
        }
        /* DATA DELETION PROCESS */
开发者ID:slims,项目名称:s3st15_matoa,代码行数:31,代码来源:member_type.php

示例13: subcription

     // filter update record ID
     $updateRecordID = (int) $_POST['updateRecordID'];
     // update the data
     $update = $sql_op->update('serial', $data, 'serial_id=' . $updateRecordID);
     if ($update) {
         utility::jsAlert(__('Subscription Data Successfully Updated'));
         utility::writeLogs($dbs, 'staff', $_SESSION['uid'], 'serial_control', $_SESSION['realname'] . ' update subcription(' . $updateRecordID . ') ' . $period);
     } else {
         utility::jsAlert(__('Subscription Data FAILED to Updated. Please Contact System Administrator') . "\nDEBUG : " . $sql_op->error);
     }
     echo '<script type="text/javascript">self.location.href = \'' . MODULES_WEB_ROOT_DIR . 'serial_control/subscription.php?biblioID=' . $biblioID . '\';</script>';
     exit;
 } else {
     /* INSERT RECORD MODE */
     // insert the data
     $insert = $sql_op->insert('serial', $data);
     $serial_id = $sql_op->insert_id;
     if ($insert) {
         $exemplar = (int) $_POST['exemplar'];
         // generate kardex entry
         $serial = new serial($dbs, $serial_id);
         $serial->generateKardexes($exemplar, true);
         // alert
         utility::jsAlert(__('New Subscription Data Successfully Saved'));
         utility::writeLogs($dbs, 'staff', $_SESSION['uid'], 'serial_control', $_SESSION['realname'] . ' add new subcription(' . $sql_op->insert_id . ') ' . $period);
     } else {
         utility::jsAlert(__('Subscription Data FAILED to Save. Please Contact System Administrator') . "\n" . $sql_op->error);
     }
     echo '<script type="text/javascript">self.location.href = \'' . MODULES_WEB_ROOT_DIR . 'serial_control/subscription.php?biblioID=' . $biblioID . '\';</script>';
     exit;
 }
开发者ID:edikriting,项目名称:SENAYAN-3-Stable,代码行数:31,代码来源:subscription.php

示例14: checkSubject

     $data['related_topic_id'] = $_POST['topicID'];
 } else {
     if ($search_str and empty($_POST['topicID'])) {
         // check subject
         $subject_id = checkSubject($search_str);
         if ($subject_id !== false) {
             $data['related_topic_id'] = $subject_id;
         } else {
             // adding new topic
             $topic_data['topic'] = $search_str;
             $topic_data['classification'] = $_POST['topicClass'];
             $topic_data['topic_type'] = 't';
             $topic_data['input_date'] = date('Y-m-d');
             $topic_data['last_update'] = date('Y-m-d');
             // insert new topic to topic master table
             $sql_op->insert('mst_topic', $topic_data);
             // put last inserted ID
             $data['related_topic_id'] = $sql_op->insert_id;
         }
     }
 }
 // data secondary vocabulary
 $_data['topic_id'] = $data['related_topic_id'];
 $_data['vocabolary_id'] = '';
 $_data['related_topic_id'] = $itemID;
 $_data['rt_id'] = false;
 if ($relatedterm === 'U') {
     $_data['rt_id'] = 'UF';
 }
 if ($relatedterm === 'UF') {
     $_data['rt_id'] = 'U';
开发者ID:mucill,项目名称:slims8_akasia,代码行数:31,代码来源:pop_vocabolary_control.php

示例15: unset

            unset($data['input_date']);
            // filter update record ID
            $updateRecordID = $dbs->escape_string(trim($_POST['updateRecordID']));
            // update the data
            $update = $sql_op->update('mst_frequency', $data, 'frequency_id=' . $updateRecordID);
            if ($update) {
                utility::jsAlert(__('Frequency Data Successfully Updated'));
                echo '<script type="text/javascript">parent.jQuery(\'#mainContent\').simbioAJAX(parent.jQuery.ajaxHistory[0].url);</script>';
            } else {
                utility::jsAlert(__('Frequency Data FAILED to Updated. Please Contact System Administrator') . "\nDEBUG : " . $sql_op->error);
            }
            exit;
        } else {
            /* INSERT RECORD MODE */
            // insert the data
            if ($sql_op->insert('mst_frequency', $data)) {
                utility::jsAlert(__('New Frequency Data Successfully Saved'));
                echo '<script type="text/javascript">parent.jQuery(\'#mainContent\').simbioAJAX(\'' . $_SERVER['PHP_SELF'] . '\');</script>';
            } else {
                utility::jsAlert(__('Frequency Data FAILED to Save. Please Contact System Administrator') . "\nDEBUG : " . $sql_op->error);
            }
            exit;
        }
    }
    exit;
} else {
    if (isset($_POST['itemID']) and !empty($_POST['itemID']) and isset($_POST['itemAction'])) {
        if (!($can_read and $can_write)) {
            die;
        }
        /* DATA DELETION PROCESS */
开发者ID:indonesia,项目名称:slims5_meranti,代码行数:31,代码来源:frequency.php


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