本文整理汇总了PHP中filter_db_can_delete_filter函数的典型用法代码示例。如果您正苦于以下问题:PHP filter_db_can_delete_filter函数的具体用法?PHP filter_db_can_delete_filter怎么用?PHP filter_db_can_delete_filter使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了filter_db_can_delete_filter函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: filter_db_delete_filter
/**
* Delete the filter specified by $p_filter_id
* @param integer $p_filter_id Filter identifier.
* @return boolean
*/
function filter_db_delete_filter($p_filter_id)
{
$c_filter_id = (int) $p_filter_id;
if (!filter_db_can_delete_filter($c_filter_id)) {
return false;
}
$t_query = 'DELETE FROM {filters} WHERE id=' . db_param();
db_query($t_query, array($c_filter_id));
return true;
}
开发者ID:vipjaven,项目名称:mantisbt,代码行数:15,代码来源:filter_api.php
示例2: require_api
require_once 'core.php';
require_api('authentication_api.php');
require_api('compress_api.php');
require_api('filter_api.php');
require_api('form_api.php');
require_api('gpc_api.php');
require_api('html_api.php');
require_api('lang_api.php');
require_api('print_api.php');
require_api('string_api.php');
auth_ensure_user_authenticated();
compress_enable();
$f_query_id = gpc_get_int('source_query_id');
$t_redirect_url = 'query_view_page.php';
$t_delete_url = 'query_delete.php';
if (!filter_db_can_delete_filter($f_query_id)) {
print_header_redirect($t_redirect_url);
}
html_page_top();
?>
<br />
<div align="center">
<center><b><?php
print string_display(filter_db_get_name($f_query_id));
?>
</b></center>
<?php
echo lang_get('query_delete_msg');
?>
<form method="post" action="<?php
开发者ID:kaos,项目名称:mantisbt,代码行数:31,代码来源:query_delete_page.php
示例3: filter_db_delete_filter
/**
* Delete the filter specified by $p_filter_id
* @param $p_filter_id
* @return bool
*/
function filter_db_delete_filter($p_filter_id)
{
$t_filters_table = db_get_table('filters');
$c_filter_id = db_prepare_int($p_filter_id);
$t_user_id = auth_get_current_user_id();
if (!filter_db_can_delete_filter($c_filter_id)) {
return false;
}
$query = 'DELETE FROM ' . $t_filters_table . ' WHERE id=' . db_param();
$result = db_query_bound($query, array($c_filter_id));
if (db_affected_rows($result) > 0) {
return true;
}
return false;
}
开发者ID:nextgens,项目名称:mantisbt,代码行数:20,代码来源:filter_api.php
示例4: foreach
<?php
$t_column_count = 0;
$t_max_column_count = 2;
foreach ($t_query_arr as $t_id => $t_name) {
if ($t_column_count == 0) {
print '<tr>';
}
print '<td>';
if (OFF != $t_rss_enabled) {
# Use the "new" RSS link style.
print_rss(rss_get_issues_feed_url(null, null, $t_id), lang_get('rss'));
echo ' ';
}
$t_query_id = (int) $t_id;
print_link('view_all_set.php?type=3&source_query_id=' . $t_query_id, $t_name);
if (filter_db_can_delete_filter($t_id)) {
echo ' ';
print_button('query_delete_page.php?source_query_id=' . $t_query_id, lang_get('delete_query'));
}
print '</td>';
$t_column_count++;
if ($t_column_count == $t_max_column_count) {
print '</tr>';
$t_column_count = 0;
}
}
# Tidy up this row
if ($t_column_count > 0 && $t_column_count < $t_max_column_count) {
for ($i = $t_column_count; $i < $t_max_column_count; $i++) {
print '<td> </td>';
}
开发者ID:gtn,项目名称:mantisbt,代码行数:31,代码来源:query_view_page.php
示例5: filter_db_delete_filter
/**
* Delete the filter specified by $p_filter_id
* @param int $p_filter_id filter id
* @return bool
*/
function filter_db_delete_filter($p_filter_id)
{
$t_filters_table = db_get_table('filters');
$c_filter_id = (int) $p_filter_id;
$t_user_id = auth_get_current_user_id();
if (!filter_db_can_delete_filter($c_filter_id)) {
return false;
}
$query = 'DELETE FROM ' . $t_filters_table . ' WHERE id=' . db_param();
$result = db_query_bound($query, array($c_filter_id));
# db_query errors on failure so:
return true;
}
开发者ID:N0ctrnl,项目名称:mantisbt,代码行数:18,代码来源:filter_api.php
示例6: filter_db_delete_filter
function filter_db_delete_filter($p_filter_id)
{
$t_filters_table = config_get('mantis_filters_table');
$c_filter_id = db_prepare_int($p_filter_id);
$t_user_id = auth_get_current_user_id();
if (!filter_db_can_delete_filter($c_filter_id)) {
return false;
}
$query = "DELETE FROM {$t_filters_table}\r\n\t\t\t\t WHERE id='{$c_filter_id}'";
$result = db_query($query);
if (db_affected_rows($result) > 0) {
return true;
}
return false;
}
开发者ID:amjadtbssm,项目名称:website,代码行数:15,代码来源:filter_api.php
注:本文中的filter_db_can_delete_filter函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论