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


PHP tool::securePostAll方法代码示例

本文整理汇总了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 {
开发者ID:pmtool,项目名称:pmtool,代码行数:31,代码来源:customers.php

示例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);
开发者ID:pmtool,项目名称:pmtool,代码行数:31,代码来源:taskdetails.php

示例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 {
开发者ID:pmtool,项目名称:pmtool,代码行数:31,代码来源:projects.php

示例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">
开发者ID:pmtool,项目名称:pmtool,代码行数:31,代码来源:requests.php

示例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'));
}
#######################################################################
开发者ID:pmtool,项目名称:pmtool,代码行数:31,代码来源:users.php

示例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 
开发者ID:pmtool,项目名称:pmtool,代码行数:31,代码来源:tasks.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 ;)");
    }
}
开发者ID:pmtool,项目名称:pmtool,代码行数:31,代码来源:groups.php


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