本文整理汇总了PHP中DataFilter::button_status方法的典型用法代码示例。如果您正苦于以下问题:PHP DataFilter::button_status方法的具体用法?PHP DataFilter::button_status怎么用?PHP DataFilter::button_status使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataFilter
的用法示例。
在下文中一共展示了DataFilter::button_status方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: intval
function related_search()
{
//relatedsearch//
$this->rapyd->load("datafilter", "datagrid");
$artid = intval($this->uri->segment(4));
$filter = new DataFilter("Search Associable Articles", "articles");
$filter->db->where("article_id<>", $artid);
## subqueries works only for mysql4.1+
//$filter->db->where("article_id NOT IN
// (SELECT rel_id FROM articles_related WHERE art_id = $artid)
//");
$subquery = $this->db->query("SELECT rel_id FROM articles_related WHERE art_id = {$artid}");
if ($subquery->num_rows() > 0) {
foreach ($subquery->result_array() as $row) {
$rels[] = $row["rel_id"];
}
$not_in = join(",", $rels);
$filter->db->where("article_id NOT IN ({$not_in})");
}
$filter->title = new inputField("title", "title");
$filter->artid = new inputField("article id", "article_id");
$filter->artid->clause = "where";
$filter->buttons("reset", "search");
$uri = site_url("rapyd/supercrud/related/{$artid}/related");
$action = "javascript:window.location='" . $uri . "';";
$filter->button_status("btn_undo", "Undo", $action, "TR", "create", "button");
$filter->build();
$grid = new DataGrid("List of associable articles");
$grid->per_page = 6;
$grid->column_orderby("article id", "article_id", "article_id", 'width="100"');
$grid->column_orderby("title", "title", "title");
$link = anchor("rapyd/supercrud/related_add/{$artid}/to/<#article_id#>", "add rel");
$grid->column("add rel", $link);
$grid->build();
$head = $this->rapyd->get_head();
$this->loadiframe($filter->output . $grid->output, $head, "related");
//endrelatedsearch//
}