本文整理汇总了PHP中simbio_dbop类的典型用法代码示例。如果您正苦于以下问题:PHP simbio_dbop类的具体用法?PHP simbio_dbop怎么用?PHP simbio_dbop使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了simbio_dbop类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: confirm
var confirmBox = confirm('Are you sure to remove selected item?' + "\n" + 'Once deleted, it can\'t be restored!');
if (confirmBox) {
// set hidden element value
document.hiddenActionForm.bid.value = int_biblio_id;
document.hiddenActionForm.remove.value = int_item_id;
// submit form
document.hiddenActionForm.submit();
}
}
</script>
<?php
/* main content */
if (isset($_POST['remove'])) {
$id = (int) $_POST['remove'];
$bid = (int) $_POST['bid'];
$sql_op = new simbio_dbop($dbs);
// check if the item still on loan
$loan_q = $dbs->query('SELECT DISTINCT l.item_code, b.title FROM loan AS l
LEFT JOIN item AS i ON l.item_code=i.item_code
LEFT JOIN biblio AS b ON i.biblio_id=b.biblio_id
WHERE i.item_id=' . $id . ' AND l.is_lent=1 AND l.is_return=0');
$loan_d = $loan_q->fetch_row();
// send an alert if the member cant be deleted
if ($loan_q->num_rows > 0) {
echo '<script type="text/javascript">';
echo 'alert(\'' . lang_mod_biblio_item_alert_delete_fail_on_loan . '\');';
echo 'self.location.href = \'iframe_item_list.php?biblioID=' . $bid . '\';';
echo '</script>';
} else {
if ($sql_op->delete('item', 'item_id=' . $id)) {
echo '<script type="text/javascript">';
开发者ID:purwoko,项目名称:SENAYAN-3-Stable,代码行数:31,代码来源:iframe_item_list.php
示例2: simbio_dbop
echo '<script type="text/javascript">parent.jQuery(\'#mainContent\').simbioAJAX(\'' . $_SERVER['PHP_SELF'] . '\');</script>';
} else {
utility::jsAlert(__('Subject 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 */
// create sql op object
$sql_op = new simbio_dbop($dbs);
$failed_array = array();
$error_num = 0;
if (!is_array($_POST['itemID'])) {
// make an array
$_POST['itemID'] = array((int) $_POST['itemID']);
}
// loop array
foreach ($_POST['itemID'] as $itemID) {
$itemID = (int) $itemID;
if (!$sql_op->delete('mst_topic', 'topic_id=' . $itemID)) {
$error_num++;
}
}
// error alerting
if ($error_num == 0) {
开发者ID:ridorido,项目名称:s3st15_matoa,代码行数:31,代码来源:topic.php
示例3: unset
</script>
<?php
/* main content */
// topic of removal
if (isset($_GET['removesess'])) {
$idx = $_GET['removesess'];
unset($_SESSION['biblioTopic'][$idx]);
echo '<script type="text/javascript">';
echo 'alert(\'Topic removed!\');';
echo 'location.href = \'iframe_topic.php\';';
echo '</script>';
}
if (isset($_POST['remove'])) {
$id = (int) $_POST['remove'];
$bid = (int) $_POST['bid'];
$sql_op = new simbio_dbop($dbs);
$sql_op->delete('biblio_topic', 'topic_id=' . $id . ' AND biblio_id=' . $bid);
echo '<script type="text/javascript">';
echo 'alert(\'Topic succesfully removed!\');';
echo 'location.href = \'iframe_topic.php?biblioID=' . $bid . '\';';
echo '</script>';
}
// if biblio ID is set
if ($biblioID) {
$table = new simbio_table();
$table->table_attr = 'align="center" style="width: 100%;" cellpadding="2" cellspacing="0"';
// database list
$biblio_topic_q = $dbs->query("SELECT bt.*, t.topic, t.topic_type FROM biblio_topic AS bt\n LEFT JOIN mst_topic AS t ON bt.topic_id=t.topic_id\n WHERE bt.biblio_id={$biblioID} ORDER BY level ASC");
$row = 1;
while ($biblio_topic_d = $biblio_topic_q->fetch_assoc()) {
// alternate the row color
开发者ID:heroesoebekti,项目名称:slims8_akasia-1,代码行数:31,代码来源:iframe_topic.php
示例4: unset
</script>
<?php
/* main content */
// author of removal
if (isset($_GET['removesess'])) {
$idx = $_GET['removesess'];
unset($_SESSION['biblioAuthor'][$idx]);
echo '<script type="text/javascript">';
echo 'alert(\'' . __('Author succesfully removed!') . '\');';
echo 'location.href = \'iframe_author.php\';';
echo '</script>';
}
if (isset($_POST['remove'])) {
$id = (int) $_POST['remove'];
$bid = (int) $_POST['bid'];
$sql_op = new simbio_dbop($dbs);
$sql_op->delete('biblio_author', 'author_id=' . $id . ' AND biblio_id=' . $bid);
echo '<script type="text/javascript">';
echo 'alert(\'' . __('Author removed!') . '\');';
echo 'location.href = \'iframe_author.php?biblioID=' . $bid . '\';';
echo '</script>';
}
// if biblio ID is set
if ($biblioID) {
$table = new simbio_table();
$table->table_attr = 'align="center" style="width: 100%;" cellpadding="2" cellspacing="0"';
// database list
$biblio_author_q = $dbs->query("SELECT ba.*, a.author_name, a.author_year, a.authority_type FROM biblio_author AS ba\n LEFT JOIN mst_author AS a ON ba.author_id=a.author_id\n WHERE ba.biblio_id={$biblioID} ORDER BY level ASC");
$row = 1;
while ($biblio_author_d = $biblio_author_q->fetch_assoc()) {
// alternate the row color
开发者ID:indonesia,项目名称:slims5_meranti,代码行数:31,代码来源:iframe_author.php
示例5: array
$author_cache = array();
$subject_cache = array();
$input_date = date('Y-m-d H:i:s');
// record counter
$r = 0;
foreach ($_POST['p2precord'] as $id) {
// construct full XML URI
$detail_uri = $p2pserver . "/index.php?p=show_detail&inXML=true&id=" . $id;
// parse XML
$data = modsXMLsenayan($detail_uri, 'uri');
// get record detail
$record = $data['records'][0];
// insert record to database
if ($record) {
// create dbop object
$sql_op = new simbio_dbop($dbs);
// escape all string value
foreach ($record as $field => $content) {
if (is_string($content)) {
$biblio[$field] = $dbs->escape_string(trim($content));
}
}
// gmd
$biblio['gmd_id'] = utility::getID($dbs, 'mst_gmd', 'gmd_id', 'gmd_name', $record['gmd'], $gmd_cache);
unset($biblio['gmd']);
// publisher
$biblio['publisher_id'] = utility::getID($dbs, 'mst_publisher', 'publisher_id', 'publisher_name', $record['publisher'], $publ_cache);
unset($biblio['publisher']);
// publish place
$biblio['publish_place_id'] = utility::getID($dbs, 'mst_place', 'place_id', 'place_name', $record['publish_place'], $place_cache);
unset($biblio['publish_place']);
开发者ID:banumelody,项目名称:slims7_cendana,代码行数:31,代码来源:p2p.php
示例6: simbio_dbop
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;
}
/* DATA DELETION PROCESS */
$sql_op = new simbio_dbop($dbs);
$failed_array = array();
$error_num = 0;
if (!is_array($_POST['itemID'])) {
// make an array
$_POST['itemID'] = array($dbs->escape_string(trim($_POST['itemID'])));
}
// loop array
foreach ($_POST['itemID'] as $itemID) {
$itemID = $dbs->escape_string(trim($itemID));
if (!$sql_op->delete('mst_language', "language_id='{$itemID}'")) {
$error_num++;
}
}
// error alerting
if ($error_num == 0) {
开发者ID:edikriting,项目名称:SENAYAN-3-Stable,代码行数:31,代码来源:doc_language.php
示例7: ob_start
}
// check for file ID in url
$fileID = 0;
if (isset($_GET['fileID']) and $_GET['fileID']) {
$fileID = (int) $_GET['fileID'];
}
// start the output buffer
ob_start();
/* main content */
// biblio topic save proccess
if (isset($_POST['upload']) and trim(strip_tags($_POST['fileTitle'])) != '') {
$uploaded_file_id = 0;
$title = trim(strip_tags($_POST['fileTitle']));
$url = trim(strip_tags($_POST['fileURL']));
// create new sql op object
$sql_op = new simbio_dbop($dbs);
// FILE UPLOADING
if (isset($_FILES['file2attach']) and $_FILES['file2attach']['size']) {
// create upload object
$file_dir = trim($_POST['fileDir']);
$file_upload = new simbio_file_upload();
$file_upload->setAllowableFormat($sysconf['allowed_file_att']);
$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);
开发者ID:slims,项目名称:s3st15_matoa,代码行数:31,代码来源:pop_attach.php
示例8: ob_start
$_q = $dbs->query('SELECT topic_id FROM mst_topic WHERE topic=\'' . $str_subject . '\'');
if ($_q->num_rows > 0) {
$_d = $_q->fetch_row();
// return the subject/topic ID
return $_d[0];
}
return false;
}
// start the output buffer
ob_start();
/* main content */
// biblio topic save proccess
if (isset($_POST['save']) and (isset($_POST['topicID']) or trim($_POST['search_str']))) {
$subject = trim($dbs->escape_string(strip_tags($_POST['search_str'])));
// create new sql op object
$sql_op = new simbio_dbop($dbs);
// check if biblioID POST var exists
if (isset($_POST['biblioID']) and !empty($_POST['biblioID'])) {
$data['biblio_id'] = (int) $_POST['biblioID'];
// check if the topic select list is empty or not
if (!empty($_POST['topicID'])) {
$data['topic_id'] = $_POST['topicID'];
} else {
if ($subject and empty($_POST['topicID'])) {
// check subject
$subject_id = checkSubject($subject);
if ($subject_id !== false) {
$data['topic_id'] = $subject_id;
} else {
// adding new topic
$topic_data['topic'] = $subject;
开发者ID:purwoko,项目名称:SENAYAN-3-Stable,代码行数:31,代码来源:pop_topic.php
示例9: isset
require SB . 'admin/default/session_check.inc.php';
require SIMBIO . 'simbio_GUI/table/simbio_table.inc.php';
require SIMBIO . 'simbio_GUI/form_maker/simbio_form_table_AJAX.inc.php';
require SIMBIO . 'simbio_GUI/paging/simbio_paging.inc.php';
require SIMBIO . 'simbio_DB/datagrid/simbio_dbgrid.inc.php';
require SIMBIO . 'simbio_DB/simbio_dbop.inc.php';
// privileges checking
$can_read = utility::havePrivilege('master_file', 'r');
$can_write = utility::havePrivilege('master_file', 'w');
// GET ID FROM URL
$itemID = (int) isset($_GET['itemID']) ? $_GET['itemID'] : 0;
if (isset($_POST['save'])) {
$data['topic_id'] = (int) $_POST['topic_id'];
$data['scope'] = trim($dbs->escape_string(strip_tags($_POST['scope'])));
# create new sql op object
$sql_op = new simbio_dbop($dbs);
if (!empty($_POST['vocabolary_id'])) {
// do update
$save = $sql_op->update('mst_voc_ctrl', $data, 'vocabolary_id=' . $_POST['vocabolary_id']);
} else {
// insert
$save = $sql_op->insert('mst_voc_ctrl', $data);
}
if (isset($_POST['delete'])) {
# create new sql op object
$save = $sql_op->delete('mst_voc_ctrl', 'vocabolary_id=' . $_POST['vocabolary_id']);
}
if ($save) {
$alert_save = '<script type="text/javascript">';
$alert_save .= 'alert(\'' . __('Data saved!') . '\');';
$alert_save .= 'parent.setIframeContent(\'itemIframe\', \'' . MWB . 'master_file/iframe_vocabolary_control.php?itemID=' . $data['topic_id'] . '\');';
开发者ID:slims,项目名称:slims8_akasia,代码行数:31,代码来源:pop_scope_vocabolary.php
示例10: ob_start
$_q = $dbs->query('SELECT author_id FROM mst_author WHERE author_name=\'' . $str_author_name . '\' AND authority_type=\'' . $str_author_type . '\'');
if ($_q->num_rows > 0) {
$_d = $_q->fetch_row();
// return the author ID
return $_d[0];
}
return false;
}
// start the output buffer
ob_start();
/* main content */
// biblio author save proccess
if (isset($_POST['save']) and (isset($_POST['authorID']) or trim($_POST['search_str']))) {
$author_name = trim($dbs->escape_string(strip_tags($_POST['search_str'])));
// create new sql op object
$sql_op = new simbio_dbop($dbs);
// check if biblioID POST var exists
if (isset($_POST['biblioID']) and !empty($_POST['biblioID'])) {
$data['biblio_id'] = intval($_POST['biblioID']);
// check if the author select list is empty or not
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;
开发者ID:slims,项目名称:s3st15_matoa,代码行数:31,代码来源:pop_author.php
示例11: ldapLogin
/**
* LDAP/Active directory login
*
* @return boolean
*/
protected function ldapLogin() {
global $ldap_configs;
if (!function_exists('ldap_connect')) {
$this->errors = 'LDAP library is not installed yet!';
return false;
}
// connect to Directory Server
$_ds = $ldap_configs['ldap_port']?ldap_connect($ldap_configs['ldap_server'], $ldap_configs['ldap_port']):ldap_connect($ldap_configs['ldap_server']);
// check LDAP options
if ($ldap_configs['ldap_options']) {
foreach ($ldap_configs['ldap_options'] as $_opt) {
@ldap_set_option($_ds, $_opt[0], $_opt[1]);
}
}
// LDAP Connection check
if (!$_ds) {
$this->errors = 'Failed to connect to LDAP server';
return false;
}
// LDAP binding
// for Active Directory Server login active line below
// $_bind = ldap_bind($_ds, ( $ldap_configs['ldap_suffix']?$this->username.'@'.$ldap_configs['ldap_suffix']:$this->username ), $this->password);
$_bind = @ldap_bind($_ds,
str_ireplace('#loginUserName', $this->username, $ldap_configs['ldap_bind_dn']),
$this->password);
if (!$_bind) {
$this->errors = 'Failed to bind to directory server!';
return false;
}
$_filter = str_ireplace('#loginUserName', $this->username, $ldap_configs['ldap_search_filter']);
// run query
$_search = @ldap_search($_ds, $ldap_configs['ldap_base_dn'], $_filter);
if (!$_search) {
$this->errors = 'LDAP search failed because of error!';
return false;
}
// get query entry
$_entries = @ldap_get_entries($_ds, $_search);
if ($_entries) {
$this->user_info['member_id'] = $_entries[0]['uid'][0];
// check member in database
$_check_q = $this->obj_db->query('SELECT m.member_id, m.member_name, m.inst_name,
m.member_email, m.expire_date, m.register_date, m.is_pending,
m.member_type_id, mt.member_type_name
FROM member AS m LEFT JOIN mst_member_type AS mt ON m.member_type_id=mt.member_type_id
WHERE m.member_id=\''.$this->user_info['member_id'].'\'');
if ($_check_q->num_rows < 1) {
$_curr_date = date('Y-m-d H:i:s');
// insert member data to database
$this->user_info['member_id'] = $_entries[0]['uid'][0];
$this->user_info['member_name'] = $_entries[0]['cn'][0];
$this->user_info['gender'] = '1';
$this->user_info['inst_name'] = 'New registered member';
$this->user_info['member_email'] = $_entries[0]['mail'][0];
$this->user_info['expire_date'] = '0000-00-00';
$this->user_info['register_date'] = '0000-00-00';
$this->user_info['is_pending'] = '1';
$this->user_info['member_type_id'] = '1';
$this->user_info['input_date'] = $_curr_date;
$this->user_info['last_update'] = $_curr_date;
// include database operation library
require_once SIMBIO_BASE_DIR.'simbio_DB/simbio_dbop.inc.php';
$_dbop = new simbio_dbop($this->obj_db);
$_insert = $_dbop->insert('member', $this->user_info);
if (!$_insert) {
$this->errors = 'Member insertion error because of: '.$_dbop->error;
}
$this->user_info['member_type_name'] = 'None';
} else {
$this->user_info = $_check_q->fetch_assoc();
}
} else {
$this->errors = 'LDAP Record not found!';
return false;
}
// closing connection
ldap_close($_ds);
return true;
}
开发者ID:purwoko,项目名称:slims3-stable15-jquery,代码行数:93,代码来源:member_logon.inc.php
示例12: simbio_dbop
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;
}
/* DATA DELETION PROCESS */
$sql_op = new simbio_dbop($dbs);
$failed_array = array();
$error_num = 0;
if (!is_array($_POST['itemID'])) {
// make an array
$_POST['itemID'] = array((int) $_POST['itemID']);
}
// loop array
foreach ($_POST['itemID'] as $itemID) {
$itemID = (int) $itemID;
if (!$sql_op->delete('mst_supplier', 'supplier_id=' . $itemID)) {
$error_num++;
}
}
// error alerting
if ($error_num == 0) {
开发者ID:sulfan,项目名称:SENAYAN-3-Stable-jQuery,代码行数:31,代码来源:supplier.php
示例13: __
// check if there is any active stock take proccess
$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') {
开发者ID:sulfan,项目名称:SENAYAN-3-Stable-jQuery,代码行数:31,代码来源:init.php
示例14: simbio_dbop
}
} else {
utility::jsAlert(__('Item 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 */
// create sql op object
$sql_op = new simbio_dbop($dbs);
$failed_array = array();
$error_num = 0;
$still_on_loan = array();
if (!is_array($_POST['itemID'])) {
// make an array
$_POST['itemID'] = array((int) $_POST['itemID']);
}
// loop array
foreach ($_POST['itemID'] as $itemID) {
$itemID = (int) $itemID;
// check if the item still on loan
$loan_q = $dbs->query('SELECT i.item_code, b.title, COUNT(l.loan_id) FROM item AS i
LEFT JOIN biblio AS b ON i.biblio_id=b.biblio_id
LEFT JOIN loan AS l ON (i.item_code=l.item_code AND l.is_lent=1 AND l.is_return=0)
WHERE i.item_id=' . $itemID . ' GROUP BY i.item_code');
开发者ID:slims,项目名称:s3st15_matoa,代码行数:31,代码来源:item.php
示例15: simbio_dbop
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 */
// create sql op object
$sql_op = new simbio_dbop($dbs);
$failed_array = array();
$error_num = 0;
if (!is_array($_POST['itemID'])) {
// make an array
$_POST['itemID'] = array((int) $_POST['itemID']);
}
// loop array
foreach ($_POST['itemID'] as $itemID) {
$itemID = (int) $itemID;
if (!$sql_op->delete('mst_loan_rules', 'loan_rules_id=' . $itemID)) {
$error_num++;
}
}
// error alerting
if ($error_num == 0) {
开发者ID:sulfan,项目名称:SENAYAN-3-Stable-jQuery,代码行数:31,代码来源:loan_rules.php
示例16: simbio_dbop
if ($insert) {
utility::jsAlert(__('New Fines Data Successfully Saved'));
} else {
utility::jsAlert(__('Fines Data FAILED to Save. Please Contact System Administrator') . "\n" . $sql_op->error);
}
}
}
}
} else {
if ($_SESSION['uid'] == 1 && isset($_POST['itemID']) && !empty($_POST['itemID']) && isset($_POST['itemAction'])) {
// only admin can delete
if (!($can_read and $can_write)) {
die;
}
/* DATA DELETION PROCESS */
$sql_op = new simbio_dbop($dbs);
$failed_array = array();
$error_num = 0;
if (!is_array($_POST['itemID'])) {
// make an array
$_POST['itemID'] = array((int) $_POST['itemID']);
}
// loop array
foreach ($_POST['itemID'] as $itemID) {
$itemID = (int) $itemID;
if (!$sql_op->delete('fines', 'fines_id=' . $itemID)) {
$error_num++;
}
}
// error alerting
if ($error_num == 0) {
开发者ID:slims,项目名称:slims8_akasia,代码行数:31,代码来源:fines_list.php
示例17: simbio_dbop
utility::jsAlert(lang_mod_masterfile_author_alert_new_add_ok);
echo '<script type="text/javascript">parent.setContent(\'mainContent\', \'' . $_SERVER['PHP_SELF'] . '\', \'post\');</script>';
} else {
utility::jsAlert(lang_mod_masterfile_author_alert_add_fail . "\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 */
$sql_op = new simbio_dbop($dbs);
$failed_array = array();
$error_num = 0;
if (!is_array($_POST['itemID'])) {
// make an array
$_POST['itemID'] = array((int) $_POST['itemID']);
}
// loop array
foreach ($_POST['itemID'] as $itemID) {
$itemID = (int) $itemID;
if (!$sql_op->delete('mst_author', 'author_id=' . $itemID)) {
$error_num++;
}
}
// error alerting
if ($error_num == 0) {
开发者ID:purwoko,项目名称:SENAYAN-3-Stable,代码行数:31,代码来源:author.php
示例18: str_replace
@unlink(REPO_BASE_DIR . str_replace('/', DIRECTORY_SEPARATOR, $_SESSION['biblioAttach'][$idx]['file_dir']) . DIRECTORY_SEPARATOR . $_SESSION['biblioAttach'][$idx]['file_name']);
// remove session array
unset($_SESSION['biblioAttach'][$idx]);
echo '<script type="text/javascript">';
echo 'alert(\'' . __('Attachment removed!') . '\');';
echo 'location.href = \'iframe_attach.php\';';
echo '</script>';
}
if (isset($_POST['bid']) and isset($_POST['remove'])) {
$bid = (int) $_POST['bid'];
$file = (int) $_POST['remove'];
// query file data from database
$file_q = $dbs->query('SELECT * FROM files WHERE file_id=' . $file);
$file_d = $file_q->fetch_assoc();
// attachment data delete
$sql_op = new simbio_dbop($dbs);
$sql_op->delete('biblio_attachment', "file_id={$file} AND biblio_id={$bid}");
echo '<script type="text/javascript">';
if ($_POST['alsoDeleteFile'] == '1') {
// remove file from repository and filesystem
@unlink(REPO_BASE_DIR . str_replace('/', DIRECTORY_SEPARATOR, $file_d['file_dir']) . DIRECTORY_SEPARATOR . $file_d['file_name']);
echo 'alert(\'Attachment ' . $file_d['file_name'] . ' succesfully removed!\');';
}
echo 'location.href = \'iframe_attach.php?biblioID=' . $bid . '\';';
echo '</script>';
}
// if biblio ID is set
if ($biblioID) {
$table = new simbio_table();
$table->table_attr = 'align="center" style="width: 100%;" cellpadding="2" cellspacing="0"';
// database list
开发者ID:slims,项目名称:s3st15_matoa,代码行数:31,代码来源:iframe_attach.php
示例19: simbio_dbop
echo '<script type="text/javascript">parent.$(\'#mainContent\').simbioAJAX(\'' . MODULES_WEB_ROOT_DIR . 'bibliography/index.php\', {method: \'post\', addData: \'itemID=' . $last_biblio_id . '&detail=true\'});</script>';
} else {
utility::jsAlert(__('Bibliography Data 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 */
// create sql op object
$sql_op = new simbio_dbop($dbs);
$failed_array = array();
$error_num = 0;
$still_have_item = array();
if (!is_array($_POST['itemID'])) {
// make an array
$_POST['itemID'] = array((int) $_POST['itemID']);
}
// loop array
$http_query = '';
foreach ($_POST['itemID'] as $itemID) {
$itemID = (int) $itemID;
// check if this biblio data still have an item
$_sql_biblio_item_q = sprintf('SELECT b.title, COUNT(item_id) FROM biblio AS b
LEFT JOIN item AS i ON b.biblio_id=i.biblio_id
WHERE b.biblio_id=%d GROUP BY title', $itemID);
开发者ID:purwoko,项目名称:slims3-stable15-jquery,代码行数:31,代码来源:index.php
示例20: simbio_dbop
} else {
utility::jsAlert(__('User Data 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 */
$sql_op = new simbio_dbop($dbs);
$failed_array = array();
$error_num = 0;
if (!is_array($_POST['itemID'])) {
// make an array
$_POST['itemID'] = array((int) $_POST['itemID']);
}
// loop array
foreach ($_POST['itemID'] as $itemID) {
$itemID = (int) $itemID;
// get user data
$user_q = $dbs->query('SELECT username, realname FROM user WHERE user_id=' . $itemID);
$user_d = $user_q->fetch_row();
if (!$sql_op->delete('user', "user_id='{$itemID}'")) {
$error_num++;
} else {
开发者ID:slims,项目名称:s3st14,代码行数:31,代码来源:app_user.php
注:本文中的simbio_dbop类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论