function sanitize($param) { return input_filter($param); }
} // TrackBack Ping if (isset($vars['tb_id']) && $vars['tb_id'] != '') { $get['cmd'] = $post['cmd'] = $vars['cmd'] = 'tb'; } // cmdもpluginも指定されていない場合は、QUERY_STRINGをページ名かInterWikiNameであるとみなす if (!isset($vars['cmd']) && !isset($vars['plugin'])) { $get['cmd'] = $post['cmd'] = $vars['cmd'] = 'read'; $argx = explode('&', $arg); $arg = is_array($argx) ? $argx[0] : $argx; if ($arg == '') { $arg = $defaultpage; } $arg = rawurldecode($arg); $arg = strip_bracket($arg); $arg = input_filter($arg); $get['page'] = $post['page'] = $vars['page'] = $arg; } ///////////////////////////////////////////////// // 初期設定($WikiName,$BracketNameなど) // $WikiName = '[A-Z][a-z]+(?:[A-Z][a-z]+)+'; // $WikiName = '\b[A-Z][a-z]+(?:[A-Z][a-z]+)+\b'; // $WikiName = '(?<![[:alnum:]])(?:[[:upper:]][[:lower:]]+){2,}(?![[:alnum:]])'; // $WikiName = '(?<!\w)(?:[A-Z][a-z]+){2,}(?!\w)'; // BugTrack/304暫定対処 $WikiName = '(?:[A-Z][a-z]+){2,}(?!\\w)'; // $BracketName = ':?[^\s\]#&<>":]+:?'; $BracketName = '(?!\\s):?[^\\r\\n\\t\\f\\[\\]<>#&":]+:?(?<!\\s)'; // InterWiki $InterWikiName = '(\\[\\[)?((?:(?!\\s|:|\\]\\]).)+):(.+)(?(1)\\]\\])'; // 注釈
function plugin_qhmsetting_user_msg() { global $vars, $script; $msg = ''; // writable check if (!is_writable(PLUGIN_QHMSETTING_USER_INI_FILE)) { return '<h2>エラー</h2><p>qhm_users.ini.txt の書き込み権限がありません。</p>'; } // writable check if (!is_writable(PLUGIN_QHMSETTING_ACCESS_INI_FILE)) { return '<h2>エラー</h2><p>qhm_access.ini.txt の書き込み権限がありません。</p>'; } // ------------------------------------ // add user if (isset($vars['user_add'])) { $error = _check_userdata($vars['qhmsetting']); if ($error != '') { return plugin_qhmsetting_user_form($error); } $data = $vars['qhmsetting']['username'] . ',{x-php-md5}' . md5($vars['qhmsetting']['passwd']) . "\n"; _write_userfile($data, "a"); $msg = "ユーザーを追加しました。"; } // ------------------------------------- // del user if ($vars['user_op'] == 'delete_user') { $users_data = _get_users_data(); $user = $vars['target_user']; if (isset($users_data[$user])) { $acclist = _get_accessdata(); $dat = ''; foreach ($acclist as $k => $acc) { if ($acc['user'] === $user) { //do nothing } else { $dat .= $acc['type'] . ',' . $acc['pattern'] . ',' . $acc['user'] . "\n"; } } _write_accessfile($dat, 'w'); unset($users_data[$user]); $data = ''; foreach ($users_data as $key => $value) { $data .= $key . ',' . $value['passwd'] . "\n"; } _write_userfile($data, "w"); } $msg = "ユーザーを削除しました。"; } // -------------------------------------- // reset passwd if ($vars['user_op'] == 'rewrite_password') { $msg = "ユーザーパスワードを設定しました"; $passwd = $vars['op_passwd']; //error $error = ''; if ($passwd == '') { $error = 'パスワードなしは、設定できません。'; } else { if (!preg_match("/^[a-zA-Z0-9]+\$/", $passwd)) { $error = 'パスワードは、半角英数を入力してください'; } } if ($error != '') { return plugin_qhmsetting_user_form($error); } $usr = $vars['target_user']; $pw = '{x-php-md5}' . md5($vars['op_passwd']); $users_data = _get_users_data(); if (isset($users_data[$usr])) { $users_data[$usr]['passwd'] = $pw; } $data = ''; foreach ($users_data as $key => $value) { $data .= $key . ',' . $value['passwd'] . "\n"; } _write_userfile($data, "w"); } // ------------------------------------------- // 権限変更 // if (isset($vars['add_access'])) { $type = input_filter($vars['type']); $pattern = _get_pregdata($vars["pattern"], $vars["pattern_pos"]); $user = input_filter($vars['access_user']); $data = $type . "," . $pattern . "," . $user . "\n"; _write_accessfile($data, "a"); $msg = '権限を追加しました。'; } if ($vars['pattern_op'] == 'delete_pattern') { //データ作成 $acclist = _get_accessdata(); unset($acclist[$vars['delno']]); $data = ''; foreach ($acclist as $key => $value) { $data .= $value['type'] . ',' . $value['pattern'] . ',' . $value['user'] . "\n"; } _write_accessfile($data, "w"); $msg = 'アクセス権限を削除しました。'; } //---------------------------------------------- // 終了処理 return plugin_qhmsetting_user_form($msg); }
foreach ($this->addons as $key => $row) { if (is_dir($row['dir'])) { $this->addons['installed'] = TRUE; } else { $this->addons['installed'] = FALSE; } } } } $ftp_info = array('hostname' => 'localhost', 'username' => '', 'password' => '', 'dir' => '', 'debug' => DEBUG); $error = ''; $warning = ''; $viewfunc = 'view_club_login'; $vdata = array('error' => ''); $post = input_filter($_POST); $get = input_filter($_GET); $ens = new EnsmallAuth(); // ! Ensmall club login if (isset($_POST['club_login'])) { $email = $post['email']; $password = $post['password']; $url = $post['install_url']; $use_proxy = $post['use_proxy']; $proxy_host = $post['proxy_host']; // Ensmall Club Auth $ens->install_url = $url; if ($use_proxy) { $ens->set_proxy($proxy_host); } $res = $ens->auth($email, $password); if ($res === ENSMALL_STATUS_SUCCESS && $ens->check_product()) {
include 'php/inputFilter.php'; //Determine what page browser is on $pageName = "home"; if (isset($_GET['pageName'])) { $pageName = input_filter($_GET['pageName']); } //Render the Header and global Head inclusions. echo file_get_contents("html/header.html"); //Render the main body of the selected page, if the file exists $current_page = "html/" . $pageName . ".html"; if (file_exists($current_page)) { echo file_get_contents($current_page); } else { echo file_get_contents("html/missing.html"); } //If at the Artists or Projects Index page, render individual artist or project content if (isset($_GET['artistName'])) { $artistName = input_filter($_GET['artistName']); //Render the content of the selected artist as HTML echo "<script> renderArtist('{$artistName}'); </script>"; } else { if (isset($_GET['projectName'])) { $projectName = input_filter($_GET['projectName']); //Render the content of the selected project as HTML echo "<script> renderProject('{$projectName}'); </script>"; } } //Render the footer echo file_get_contents("html/footer.html"); //Underlines the link of the current page echo "<script> underlineLink('{$pageName}'); </script>";
//主要的函数文件 require PBBLOG_ROOT . '/includes/base.function.php'; //一些基本的函数文件 require PBBLOG_ROOT . '/includes/mysql.class.php'; //数据库类文件 if (PHP_VERSION > 5.1) { if (empty($timezone)) { $timezone = 'Etc/GMT-8'; } date_default_timezone_set($timezone); } // 对传入的变量过滤 if (!get_magic_quotes_gpc()) { $_GET = empty($_GET) ? '' : input_filter($_GET); $_POST = empty($_POST) ? '' : input_filter($_POST); $_COOKIE = empty($_COOKIE) ? '' : input_filter($_COOKIE); } $setup = !empty($_POST['setup']) ? $_POST['setup'] : 'check'; if (file_exists(PBBLOG_ROOT . 'home/data/config.php')) { require_once PBBLOG_ROOT . 'home/data/config.php'; } if ($install_lock && $setup != 'finish') { header('location: ../index.php'); } ?> <!DOCTYPE> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>安装Simple-log</title>
<?php /* Dillon Bastan 2015. This is the PHP script for adding a client to a newsletter. */ //Has the function for filtering input include 'inputFilter.php'; if (isset($_POST['clientEmail'])) { $clientEmail = input_filter($_POST['clientEmail']); } $masterEmail = "*****@*****.**"; $subject = "Add to newsletter"; $msg = "Add {$clientEmail} to the newsletter system."; $headers = "From: newsletter@aetherialrecords.com"; $headers .= "Reply-To: {$clientEmail}"; $sendStatus = mail($masterEmail, $subject, $msg, $headers); if (empty($clientEmail)) { echo "Email field is empty."; } else { if ($sendStatus) { echo "Success!"; } else { echo "Failed!"; } }
$timezone = 'Etc/GMT-8'; } date_default_timezone_set($timezone); } $time = time(); $date = date('Y-m-d H:i:s', $time); //关闭set_magic_quotes_runtime和设置错误输出信息 if (version_compare(PHP_VERSION, 5.3, '<')) { set_magic_quotes_runtime(0); } // 对传入的变量过滤 if (!get_magic_quotes_gpc()) { $_GET = empty($_GET) ? '' : input_filter($_GET); $_POST = empty($_POST) ? '' : input_filter($_POST); $_COOKIE = empty($_COOKIE) ? '' : input_filter($_COOKIE); $_FILES = empty($_FILES) ? '' : input_filter($_FILES); } //开始获得客户端的参数 $ip = ip(); $referer_url = referer_url(); $url = url(); //初始化数据库 $db = new cls_mysql(); $db->connect($dbhost, $dbuser, $dbpw, $dbname, $charset, $pconnect); unset($dbhost, $dbuser, $dbname, $charset, $pconnect); //获取网站配置信息 $config = array(); $sql = 'SELECT * FROM ' . table('config'); $res = $db->getAll($sql); foreach ($res as $row) { $config[$row['key']] = $row['value'];