Example #1
0
 function doAjaxRemove()
 {
     $data = am4Request::get("data");
     parse_str($data, $vars);
     if (!empty($vars['post']) && is_array($vars['post'])) {
         foreach ($vars['post'] as $v) {
             $ps = new am4_Settings_Post_Meta();
             $ps->loadFromArray(array())->setPostId($v)->save();
         }
     }
 }
Example #2
0
 function doSave()
 {
     $options = get_magic_quotes_gpc() ? stripslashes_deep(am4Request::get('options')) : am4Request::get('options');
     if (($errors = $this->validate($options)) !== true) {
         $this->doIndex($options, $errors);
     } else {
         $this->saveForm($options);
         $this->doIndex();
     }
 }
Example #3
0
 function doAjaxDelete()
 {
     $id = am4Request::getInt('id');
     $errors = $this->getOptions();
     $errors->delete($id)->save();
 }
Example #4
0
 static function init()
 {
     foreach ($_GET as $k => $v) {
         self::$vars[$k] = $v;
         self::$get[$k] = $v;
     }
     foreach ($_POST as $k => $v) {
         self::$vars[$k] = $v;
         self::$post[$k] = $v;
     }
     self::$method = $_SERVER['REQUEST_METHOD'];
 }
Example #5
0
 function doAjaxRemove()
 {
     $data = am4Request::get("data");
     parse_str($data, $vars);
     if ($vars['post'] && is_array($vars['post'])) {
         foreach ($vars['post'] as $v) {
             update_post_meta($v, AM4_POST_META, array());
         }
     }
 }
Example #6
0
 function doAjaxDelete()
 {
     $id = am4Request::getInt('id');
     $options = $this->getOptions();
     unset($options[$id]);
     update_option(AM4_ERROR_OPTION, $options);
 }