本文整理汇总了PHP中mdeleteIndex函数的典型用法代码示例。如果您正苦于以下问题:PHP mdeleteIndex函数的具体用法?PHP mdeleteIndex怎么用?PHP mdeleteIndex使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了mdeleteIndex函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
$eventObj->BeforeProcessExport($pageObject);
}
$strWhereClause = "";
$strHavingClause = "";
$strSearchCriteria = "and";
$selected_recs = array();
$options = true;
if (@$_REQUEST["a"] != "") {
$options = false;
$sWhere = "1=0";
// process selection
$selected_recs = array();
if (@$_REQUEST["mdelete"]) {
foreach (@$_REQUEST["mdelete"] as $ind) {
$keys = array();
$keys["SourceID"] = refine($_REQUEST["mdelete1"][mdeleteIndex($ind)]);
$selected_recs[] = $keys;
}
} elseif (@$_REQUEST["selection"]) {
foreach (@$_REQUEST["selection"] as $keyblock) {
$arr = explode("&", refine($keyblock));
if (count($arr) < 1) {
continue;
}
$keys = array();
$keys["SourceID"] = urldecode($arr[0]);
$selected_recs[] = $keys;
}
}
foreach ($selected_recs as $keys) {
$sWhere = $sWhere . " or ";
示例2: array
}
// Before Process event
if ($eventObj->exists("BeforeProcessPrint")) {
$eventObj->BeforeProcessPrint($conn, $pageObject);
}
$strWhereClause = "";
$strHavingClause = "";
$strSearchCriteria = "and";
$selected_recs = array();
if (@$_REQUEST["a"] != "") {
$sWhere = "1=0";
// process selection
if (@$_REQUEST["mdelete"]) {
foreach (@$_REQUEST["mdelete"] as $ind) {
$keys = array();
$keys["id"] = refine($_REQUEST["mdelete1"][mdeleteIndex($ind)]);
$selected_recs[] = $keys;
}
} elseif (@$_REQUEST["selection"]) {
foreach (@$_REQUEST["selection"] as $keyblock) {
$arr = explode("&", refine($keyblock));
if (count($arr) < 1) {
continue;
}
$keys = array();
$keys["id"] = urldecode($arr[0]);
$selected_recs[] = $keys;
}
}
foreach ($selected_recs as $keys) {
$sWhere = $sWhere . " or ";
示例3: deleteRecords
/**
* Delete selected records
*/
function deleteRecords()
{
global $globalEvents;
$this->deleteMessage = "";
if (@$_REQUEST["mdelete"]) {
foreach (@$_REQUEST["mdelete"] as $ind) {
for ($i = 0; $i < count($this->arrKeyFields); $i++) {
$keys[$this->arrKeyFields[$i]] = refine($_REQUEST["mdelete" . ($i + 1)][mdeleteIndex($ind)]);
}
$this->selectedRecs[] = $keys;
}
} elseif (@$_REQUEST["selection"]) {
foreach (@$_REQUEST["selection"] as $keyblock) {
$arr = explode("&", refine($keyblock));
if (count($arr) < count($this->arrKeyFields)) {
continue;
}
for ($i = 0; $i < count($this->arrKeyFields); $i++) {
$keys[$this->arrKeyFields[$i]] = urldecode(@$arr[$i]);
}
$this->selectedRecs[] = $keys;
}
}
$this->recordsDeleted = 0;
$this->lockDelRec = array();
foreach ($this->selectedRecs as $keys) {
$where = KeyWhere($keys);
// delete only owned records
if ($this->nSecOptions != ADVSECURITY_ALL && $this->nLoginMethod == SECURITY_TABLE && $this->createLoginPage) {
$where = whereAdd($where, SecuritySQL("Delete"));
}
$strSQl = "delete from " . AddTableWrappers($this->origTName) . " where " . $where;
$retval = true;
$deletedrs = db_query(SQLQuery::gSQLWhere_having($this->gsqlHead, $this->gsqlFrom, $this->gsqlWhereExpr, $this->gsqlGroupBy, $this->gsqlHaving, $where), $this->conn);
$deleted_values = $this->cipherer->DecryptFetchedArray($deletedrs);
if ($globalEvents->exists("IsRecordEditable", $this->tName)) {
if (!$globalEvents->IsRecordEditable($deleted_values, true, $this->tName)) {
continue;
}
}
if ($this->eventExists("BeforeDelete")) {
$tdeleteMessage = $this->deleteMessage;
$retval = $this->eventsObject->BeforeDelete($where, $deleted_values, $tdeleteMessage, $this);
$this->deleteMessage = $tdeleteMessage;
}
$lockRecord = false;
if ($this->lockingObj) {
$lockWhere = "";
foreach ($keys as $keysvalue) {
$lockWhere .= rawurlencode($keysvalue) . "&";
}
$lockWhere = substr($lockWhere, 0, -1);
$lockSQL = "select * from " . AddTableWrappers("") . " where " . AddFieldWrappers("keys") . "=" . db_prepare_string($lockWhere) . " and " . AddFieldWrappers("table") . "=" . db_prepare_string($this->origTName) . " and " . AddFieldWrappers("action") . "=1";
$lockSet = db_query($lockSQL, $this->conn);
if ($data = db_fetch_array($lockSet)) {
$lockRecord = true;
$this->lockDelRec[] = $keys;
}
if ($this->mode == LIST_SIMPLE) {
$_SESSION[$this->sessionPrefix . "_lockDelRec"] = $this->lockDelRec;
}
}
if (!$lockRecord && @$_REQUEST["a"] == "delete" && $retval) {
$this->recordsDeleted++;
// delete associated uploaded files if any
DeleteUploadedFiles($this->pSet, $deleted_values);
LogInfo($strSQl);
db_exec($strSQl, $this->conn);
if ($this->audit && $deleted_values) {
$fieldsList = $this->pSet->getFieldsList();
$i = 0;
foreach ($deleted_values as $key => $value) {
if (IsBinaryType($this->pSet->getFieldType($fieldsList[$i]))) {
$deleted_audit_values[$fieldsList[$i]] = $value;
} else {
$deleted_audit_values[$key] = $value;
}
$i++;
}
$this->audit->LogDelete($this->tName, $deleted_audit_values, $keys);
}
if ($this->eventExists("AfterDelete")) {
$tdeleteMessage = $this->deleteMessage;
$this->eventsObject->AfterDelete($where, $deleted_values, $tdeleteMessage, $this);
$this->deleteMessage = $tdeleteMessage;
}
}
if (strlen($this->deleteMessage)) {
$this->xt->assignbyref("message", $this->deleteMessage);
$this->xt->assign("message_block", true);
}
}
if (count($this->selectedRecs) && $this->eventExists("AfterMassDelete")) {
$this->eventsObject->AfterMassDelete($this->recordsDeleted, $this);
}
}
示例4: array
}
$strWhereClause = "";
$strHavingClause = "";
$strSearchCriteria = "and";
$selected_recs = array();
$options = true;
if (@$_REQUEST["a"] != "") {
$options = false;
$sWhere = "1=0";
// process selection
$selected_recs = array();
if (@$_REQUEST["mdelete"]) {
foreach (@$_REQUEST["mdelete"] as $ind) {
$keys = array();
$keys["GroupID"] = refine($_REQUEST["mdelete1"][mdeleteIndex($ind)]);
$keys["CompanyID"] = refine($_REQUEST["mdelete2"][mdeleteIndex($ind)]);
$selected_recs[] = $keys;
}
} elseif (@$_REQUEST["selection"]) {
foreach (@$_REQUEST["selection"] as $keyblock) {
$arr = explode("&", refine($keyblock));
if (count($arr) < 2) {
continue;
}
$keys = array();
$keys["GroupID"] = urldecode($arr[0]);
$keys["CompanyID"] = urldecode($arr[1]);
$selected_recs[] = $keys;
}
}
foreach ($selected_recs as $keys) {
示例5: array
$strWhereClause = "";
$strHavingClause = "";
$strSearchCriteria = "and";
$selected_recs = array();
$options = true;
if (@$_REQUEST["a"] != "") {
$options = false;
$sWhere = "1=0";
// process selection
$selected_recs = array();
if (@$_REQUEST["mdelete"]) {
foreach (@$_REQUEST["mdelete"] as $ind) {
$keys = array();
$keys["Grp_id"] = refine($_REQUEST["mdelete1"][mdeleteIndex($ind)]);
$keys["StockCode"] = refine($_REQUEST["mdelete2"][mdeleteIndex($ind)]);
$keys["Coy_Id"] = refine($_REQUEST["mdelete3"][mdeleteIndex($ind)]);
$selected_recs[] = $keys;
}
} elseif (@$_REQUEST["selection"]) {
foreach (@$_REQUEST["selection"] as $keyblock) {
$arr = explode("&", refine($keyblock));
if (count($arr) < 3) {
continue;
}
$keys = array();
$keys["Grp_id"] = urldecode($arr[0]);
$keys["StockCode"] = urldecode($arr[1]);
$keys["Coy_Id"] = urldecode($arr[2]);
$selected_recs[] = $keys;
}
}
示例6: array
$gQuery->ReplaceFieldsWithDummies(GetBinaryFieldsIndices());
}
// Before Process event
if ($eventObj->exists("BeforeProcessPrint")) {
$eventObj->BeforeProcessPrint($conn);
}
$strWhereClause = "";
$strHavingClause = "";
$selected_recs = array();
if (@$_REQUEST["a"] != "") {
$sWhere = "1=0";
// process selection
if (@$_REQUEST["mdelete"]) {
foreach (@$_REQUEST["mdelete"] as $ind) {
$keys = array();
$keys["Record ID"] = refine($_REQUEST["mdelete1"][mdeleteIndex($ind)]);
$selected_recs[] = $keys;
}
} elseif (@$_REQUEST["selection"]) {
foreach (@$_REQUEST["selection"] as $keyblock) {
$arr = explode("&", refine($keyblock));
if (count($arr) < 1) {
continue;
}
$keys = array();
$keys["Record ID"] = urldecode($arr[0]);
$selected_recs[] = $keys;
}
}
foreach ($selected_recs as $keys) {
$sWhere = $sWhere . " or ";