本文整理匯總了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//
}