CMS  Version 3.9
rss_article_form.inc
Go to the documentation of this file.
1 <?php
2 Fakoli::using("rss_feed");
3 Fakoli::usingFeature("auto_form");
4 
5 $menu_item = "RSS Feeds";
6 
7 $rss_article_id = checkNumeric($_GET["rss_article_id"]);
8 $feed_id = checkNumeric($_GET["feed_id"]);
9 
11 
12 if ($rss_article_id)
13 {
15 }
16 else
17 {
18  //$RSSFeedArticles->sort_order = Query::create(rssFeed, "")->executeValue("MAX(sort_order)") + 1;
19 }
20 
21 $form = new AutoForm($RSSFeedArticles);
22 $form->required("rss_title");
23 $form->hide("last_updated","date_added","rss_article_id","rss_feed_id");
24 
25 $form->allowDelete = true;
26 $form->button("Cancel", "/admin/rss_feed_articles?rss_feed_id=$feed_id");
27 
28 if ($method == "POST")
29 {
30  if ($form->save())
31  {
32  redirect("/admin/rss_feed_articles?rss_feed_id=$feed_id");
33  }
34 }
35 
36 $script .= $form->writeScript();
37 
38 $form->drawForm();
39 
40 
41 ?>
$form
static usingFeature()
Uses the specified framework feature(s).
Definition: core.inc:388
static using()
Import the datamodels, views and manifest for the specified component(s).
Definition: core.inc:116
$method
Pull out a simple reference to the request method.
Definition: core.inc:1573
$RSSFeedArticles
$rss_article_id
$menu_item
$feed_id
if($method=="POST") $script