GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — p2-php/post_draft.php at master · unpush/p2-php Expand file tree/ Copy pathpost_draft.phpMore file actions 70 lines (56 loc) · 1.88 KB / Copy pathpost_draft.phpFile metadata and controls70 lines (56 loc) · 1.88 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 <?php /** * ImageCache2 - 下書き保存する */ // {{{ p2基本設定読み込み&認証 require_once './conf/conf.inc.php'; $_login->authorize(); // 引数エラー if (empty($_POST['host'])) { // 引数の指定が変です echo 'null'; exit; } $el = error_reporting(E_ALL & ~E_NOTICE); $salt = 'post' . $_POST['host'] . $_POST['bbs'] . $_POST['key']; error_reporting($el); if (!isset($_POST['csrfid']) or $_POST['csrfid'] != P2Util::getCsrfId($salt)) { // 不正なポストです echo 'null'; exit; } // }}} // {{{ HTTPヘッダ P2Util::header_nocache(); header('Content-Type: text/plain; charset=UTF-8'); // }}} // {{{ 初期化 $post_param_keys = array('bbs', 'key', 'time', 'FROM', 'mail', 'MESSAGE', 'subject', 'submit'); $post_internal_keys = array('host', 'sub', 'popup', 'rescount', 'ttitle_en'); foreach ($post_param_keys as $pk) { ${$pk} = (isset($_POST[$pk])) ? mb_convert_encoding($_POST[$pk], 'CP932', 'UTF-8') : ''; } foreach ($post_internal_keys as $pk) { ${$pk} = (isset($_POST[$pk])) ? $_POST[$pk] : ''; } // したらばのlivedoor移転に対応。post先をlivedoorとする。 $host = P2Util::adjustHostJbbs($host); // machibbs、JBBS@したらば なら if (P2Util::isHostMachiBbs($host) or P2Util::isHostJbbsShitaraba($host)) { /* compact() と array_combine() でPOSTする値の配列を作るので、 $post_param_keys と $post_send_keys の値の順序は揃える! */ //$post_param_keys = array('bbs', 'key', 'time', 'FROM', 'mail', 'MESSAGE', 'subject', 'submit'); $post_send_keys = array('BBS', 'KEY', 'TIME', 'NAME', 'MAIL', 'MESSAGE', 'SUBJECT', 'submit'); // 2ch } else { $post_send_keys = $post_param_keys; } $post = array_combine($post_send_keys, compact($post_param_keys)); unset($post['submit']); // }}} // {{{ execute $post_backup_key = PostDataStore::getKeyForBackup($host, $bbs, $key, !empty($_REQUEST['newthread'])); PostDataStore::set($post_backup_key, $post); echo '1'; exit; // }}} |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |