本文整理汇总了PHP中tool::securePostAll方法的典型用法代码示例。如果您正苦于以下问题:PHP tool::securePostAll方法的具体用法?PHP tool::securePostAll怎么用?PHP tool::securePostAll使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类tool
的用法示例。
在下文中一共展示了tool::securePostAll方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: customer
echo $lang['common_customers'];
?>
</h1>
<?php
$customerInst = new customer();
#######################################################################
## perform action
$status = 1;
if (tool::securePost('action') == "save" && tool::securePost('id')) {
# fill customer with submitted data
$customerInst->id = tool::securePost('id');
$customerInst->fill(tool::securePostAll());
$status = $customerInst->update();
} elseif (tool::securePost('action') == "save") {
$customerInst->fill(tool::securePostAll());
$status = $customerInst->insert();
}
if (tool::securePost('action') == "delete") {
$customerInst->id = tool::securePost('id');
$customerInst->delete();
}
if (tool::securePost('action') == "edit") {
$status = 0;
$customerInst->activate(tool::securePost('id'));
}
#######################################################################
## make edit / new form
if (!$status) {
echo "<h2>" . $lang['common_editRecord'] . " (<a href=\"" . $toolInst->encodeUrl("index.php?content=" . $content) . "\">" . $lang['common_newRecord'] . "</a>)</h2>\n";
} else {
示例2: elseif
$jobInst->start = $toolInst->timestampToSec(tool::securePost('startyear'), tool::securePost('startmonth'), tool::securePost('startday'), tool::securePost('starthour'), tool::securePost('startmin'));
$jobInst->stop = $toolInst->timestampToSec(tool::securePost('stopyear'), tool::securePost('stopmonth'), tool::securePost('stopday'), tool::securePost('stophour'), tool::securePost('stopmin'));
$saveflags = 0;
// handle job flags
if (tool::securePost('privatejob') == "1") {
$saveflags += JOB_FLAG_PRIVATE;
}
$jobInst->flags = $saveflags;
$jobInst->stop();
if (tool::securePost('taskdone') == "1") {
$taskInst->stop();
$taskInst->update();
}
} elseif (tool::securePost('action') == "save") {
// start job
$jobInst->fill(tool::securePostAll());
$jobInst->taskId = $taskInst->id;
$jobInst->start = $toolInst->timestampToSec(tool::securePost('startyear'), tool::securePost('startmonth'), tool::securePost('startday'), tool::securePost('starthour'), tool::securePost('startmin'));
$saveflags = 0;
// handle job flags
if (tool::securePost('privatejob') == "1") {
$saveflags += JOB_FLAG_PRIVATE;
}
$jobInst->flags = $saveflags;
$jobId = $jobInst->start();
$jobInst->activate($jobId);
} elseif (tool::securePost('action') == "deleteattach") {
$attachment = new attachment(tool::securePost('id'));
$attachment->delete();
// we need to reload the task to clear the attachment member in this object
$taskInst->activate($taskInst->id);
示例3: project
?>
</h1>
<?php
$projectInst = new project();
if (!$loginInst->isCustomer()) {
#######################################################################
## perform action
$status = 1;
if (tool::securePost('action') == "save" && tool::securePost('id')) {
# fill project with submitted data
$projectInst->id = tool::securePost('id');
$projectInst->fill(tool::securePostAll());
$status = $projectInst->update();
} elseif (tool::securePost('action') == "save") {
$projectInst->fill(tool::securePostAll());
$status = $projectInst->insert();
}
if (tool::securePost('action') == "delete") {
$projectInst->id = tool::securePost('id');
$projectInst->delete();
}
if (tool::securePost('action') == "edit") {
$status = 0;
$projectInst->activate(tool::securePost('id'));
}
#######################################################################
## make edit / new form
if (!$status) {
echo "<h2>" . $lang['common_editRecord'] . " (<a href=\"" . $toolInst->encodeUrl("index.php?content=" . $content) . "\">" . $lang['common_newRecord'] . "</a>)</h2>\n";
} else {
示例4:
$recordType = "new";
} else {
$recordType = "edit";
}
}
if ($action == "new") {
$requestInst->fill(tool::securePostAll());
if ($requestInst->insert()) {
$requestInst->clear();
}
}
if ($action == "search") {
if (tool::securePost('lastrecordtype')) {
$recordType = tool::securePost('lastrecordtype');
}
$requestInst->fill(tool::securePostAll());
}
if ($action == "delete") {
$requestInst->id = tool::securePost('id');
$requestInst->delete();
$requestInst->clear();
}
if ($action == "edit") {
$recordType = "edit";
$requestInst->activate(tool::securePost('id'));
}
#######################################################################
## make edit / new form
?>
<form method="post" name="form1" enctype="multipart/form-data">
示例5: user
<?php
$userInst = new user();
#######################################################################
## perform action
$status = 1;
if (tool::securePost('action') && tool::securePost('action') == "save" && tool::securePost('id') && tool::securePost('id') != "") {
# fill user with submitted data
$userInst->id = tool::securePost('id');
$userInst->fill(tool::securePostAll());
if (!DEMO_MODE) {
$status = $userInst->update();
} else {
$toolInst->errorStatus("not allowed in this demo. Sorry ;)");
}
} elseif (tool::securePost('action') && tool::securePost('action') == "save") {
$userInst->fill(tool::securePostAll());
$status = $userInst->insert();
}
if (tool::securePost('action') && tool::securePost('action') == "delete" && tool::securePost('id') && tool::securePost('id') != "") {
$userInst->id = tool::securePost('id');
if (!DEMO_MODE) {
$userInst->delete();
} else {
$toolInst->errorStatus("not allowed in this demo. Sorry ;)");
}
}
if (tool::securePost('action') && tool::securePost('action') == "edit" && tool::securePost('id') && tool::securePost('id') != "") {
$status = 0;
$userInst->activate(tool::securePost('id'));
}
#######################################################################
示例6:
if ($action == "search") {
if (tool::securePost('lastrecordtype')) {
$recordType = tool::securePost('lastrecordtype');
}
$taskInst->fill(tool::securePostAll());
$taskInst->id = tool::securePost('id');
}
if ($action == "delete") {
$taskInst->id = tool::securePost('id');
$taskInst->delete();
}
if ($action == "edit") {
$recordType = "edit";
$taskInst->activate(tool::securePost('id'));
}
$taskInst->fillFilter(tool::securePostAll());
#######################################################################
## make edit / new form
?>
<form method="post" name="form1" enctype="multipart/form-data">
<input type="hidden" name="MAX_FILE_SIZE" value="<?php
echo $config['attach_maxfilesize'];
?>
">
<input type="hidden" name="id" value="<?php
echo $taskInst->id;
?>
">
<input type="hidden" name="action" value="">
<input type="hidden" name="order" value="<?php
示例7:
}
}
if (tool::securePost('action') == "update") {
$recordType = "edit";
$accessInst->fill(tool::securePostAll());
if (!DEMO_MODE) {
if ($accessInst->update()) {
$accessInst->clear();
$recordType = "new";
}
} else {
$toolInst->errorStatus("not allowed in this demo. Sorry ;)");
}
}
if (tool::securePost('action') == "new") {
$accessInst->fill(tool::securePostAll());
if ($accessInst->insert()) {
$accessInst->clear();
$recordType = "new";
} else {
$recordType = "edit";
}
}
if (tool::securePost('action') == "delete") {
$accessInst->id = tool::securePost('id');
if (!DEMO_MODE) {
$accessInst->delete();
} else {
$toolInst->errorStatus("not allowed in this demo. Sorry ;)");
}
}