* Optionally, use the options for the type for further control * You can leave out any variables that will be strings and then use the 3rd parameter * to apply the default string validation. If you set the $strict parameter to TRUE, though, * you will discard any variables not explicitly found in the filter array */ $filter_post = array('name' => 'str', 'cid' => 'int', 'imageurl' => 'url', 'imptotal' => 'int', 'htmlbanner' => 'int', 'htmlcode' => 'html', 'contact' => 'str', 'email' => array('email', 'options' => array(0, 1)), 'login' => 'str', 'passwd' => 'str', 'extrainfo' => 'str', 'bid' => 'int', 'clickurl' => 'url', 'op' => 'str', 'impadded' => 'int', 'fct' => 'str'); $filter_get = array('bid' => 'int', 'cid' => 'int', 'fct' => 'str', 'op' => 'str'); $name = $imageurl = $htmlcode = $contact = ''; $email = $login = $passwd = $extrainfo = $clickurl = $op = ''; $bid = $cid = $imptotal = $htmlbanner = $impadded = 0; if (!empty($_POST)) { $clean_POST = icms_core_DataFilter::checkVarArray($_POST, $filter_post, FALSE); extract($clean_POST); } if (!empty($_GET)) { $clean_GET = icms_core_DataFilter::checkVarArray($_GET, $filter_get, FALSE); extract($clean_GET); } switch ($op) { default: case 'BannersAdmin': BannersAdmin(); break; case 'BannersAdd': if (!icms::$security->check()) { redirect_header('admin.php?fct=banners&op=BannersAdmin#top', 3, implode('<br />', icms::$security->getErrors())); } if ($cid <= 0) { redirect_header('admin.php?fct=banners&op=BannersAdmin#top'); } $db =& icms_db_Factory::instance();
'user_intrest'=> 'str', 'user_mailok' => 'int', 'theme_selected'=> 'str', 'usecookie' => 'int', 'xoops_upload_file' => 'array' 'user_avatar'=> 'str', 'op' => 'str', */ $filter_post = array('user_sig' => 'html', 'email' => array('email', 'options' => array(0, 1)), 'uid' => 'int', 'change_pass' => 'int', 'url' => 'url', 'user_viewemail' => 'int', 'user_viewoid' => 'int', 'attachsig' => 'int', 'user_mailok' => 'int', 'usecookie' => 'int'); $filter_get = array('uid' => 'int'); if (!empty($_GET)) { $clean_GET = icms_core_DataFilter::checkVarArray($_GET, $filter_get, FALSE); extract($clean_GET); } if (!empty($_POST)) { $clean_POST = icms_core_DataFilter::checkVarArray($_POST, $filter_post, FALSE); extract($clean_POST); } switch ($op) { case 'saveuser': if (!icms::$security->check()) { redirect_header('index.php', 3, _US_NOEDITRIGHT . "<br />" . implode('<br />', icms::$security->getErrors())); } if (icms::$user->getVar('uid') != $uid) { redirect_header('index.php', 3, _US_NOEDITRIGHT); } $errors = array(); if ($icmsConfigUser['allow_chgmail'] == 1) { if (!empty($email)) { $email = icms_core_DataFilter::stripSlashesGPC(trim($email)); }