diff --git a/web/admin/develop/code_pc_html.php b/web/admin/develop/code_pc_html.php index 78dac58..359581e 100644 --- a/web/admin/develop/code_pc_html.php +++ b/web/admin/develop/code_pc_html.php @@ -906,6 +906,7 @@ data; data; } $codex .= << diff --git a/web/admin/develop/code_pc_php.php b/web/admin/develop/code_pc_php.php index 298472a..2e4ea3a 100644 --- a/web/admin/develop/code_pc_php.php +++ b/web/admin/develop/code_pc_php.php @@ -77,7 +77,7 @@ function code_pc_php($post) { $codex .= "\n"; $codex .= "\nclass {$classname} {"; $codex .= "\n static function setwhere(\$db, \$post, \$rsuser) {"; - $codex .= "\n \$query = \$post->get('query');"; + $codex .= "\n \$query = \$post->get('query', array());"; $codex .= "\n \$csql = new \ciy\sql('{$tabname}');"; if (!empty($liiddict)) { $codex .= "\n \$liid = objint(\$query, 'liid');"; diff --git a/web/jscss/ciy.js b/web/jscss/ciy.js index aa854a4..02ca8c8 100644 --- a/web/jscss/ciy.js +++ b/web/jscss/ciy.js @@ -248,6 +248,8 @@ _ciydomclas.prototype.attr = function (name, value) { if (!this[0] || !iselement(this[0])) return null; if (value === undefined) { + if (name in this[0]) + return this[0][name]; var val = this[0].getAttribute(name); if (val === null) return null; @@ -262,7 +264,9 @@ _ciydomclas.prototype.attr = function (name, value) { this.each(function (dom) { if (value === null) return dom.removeAttribute(name); - if (typeof (value) == 'string' || typeof (value) == 'number') + if (name in dom) + return dom[name] = value; + if (typeof (value) == 'string' || typeof (value) == 'number' || typeof (value) == 'boolean') return dom.setAttribute(name, value); dom.setAttribute(name, ciyfn.jsontostr({ v: value })); }); @@ -1317,7 +1321,8 @@ ciyfn.makeuploadpath = function (mpath, saas) { } ciyfn.ccode = function (arr, value, field, nonestr) { field = field || 'name'; - nonestr = nonestr || '--'; + if (typeof (nonestr) === 'undefined') + nonestr = '--'; arr = ciyfn.getdictdata(arr); if (typeof (arr) != 'object') return '!'; @@ -1334,7 +1339,7 @@ ciyfn.ccode = function (arr, value, field, nonestr) { } if (field == '_obj') return null; - if (value < 1) + if (!value) return nonestr; return ''; } diff --git a/web/jscss/ciycmp.js b/web/jscss/ciycmp.js index 6a3ccae..7b0bcb6 100644 --- a/web/jscss/ciycmp.js +++ b/web/jscss/ciycmp.js @@ -994,8 +994,8 @@ ciycmpfunc.ciyselect = function (opn) { this.range.unshift({ id: '', name: opn.all + '', _nofilter: true }); } if (ciyfn.topinyin) { - for (var i in thos.range) - thos.range[i]._py = ciyfn.topinyin(thos.range[i].name); + for (var i in this.range) + this.range[i]._py = ciyfn.topinyin(this.range[i].name); } if (this.value !== undefined) this.setvalue(); diff --git a/web/jscss/ciytable.js b/web/jscss/ciytable.js index eec22f2..e5df6af 100644 --- a/web/jscss/ciytable.js +++ b/web/jscss/ciytable.js @@ -833,7 +833,7 @@ ciyfn.fillsearch = function (opn) { html += ' - '; else if (sp.type == 'select' || sp.type == 'radio') { if (sp.type == 'select') - html += ''; + html += ''; if (sp.type == 'radio') html += ''; sp.def = sp.def || ''; diff --git a/web/jscss/style.css b/web/jscss/style.css index a2f6cc6..25974c2 100644 --- a/web/jscss/style.css +++ b/web/jscss/style.css @@ -1510,6 +1510,7 @@ textarea[disabled], select[disabled], input[disabled], input[disabled]+i, .btn.d display: inline-block; flex: 1; vertical-align: top; + min-width: 0; } .ciy-form>label { @@ -2338,6 +2339,10 @@ fieldset.tips>div>ul>li { font-size: 1.5em; } +.txt-lgggg.txt-lgggg.txt-lgggg { + font-size: 2em; +} + .txt-wb.txt-wb.txt-wb { font-weight: bold; } @@ -2547,10 +2552,12 @@ fieldset.tips>div>ul>li { .flex1.flex1.flex1 { flex: 1; + min-width: 0; } .flexnone.flexnone.flexnone { flex: none; + min-width: 0; } .flex-center.flex-center.flex-center { diff --git a/zciyphp/http.php b/zciyphp/http.php index d8fad9b..4fe3f43 100644 --- a/zciyphp/http.php +++ b/zciyphp/http.php @@ -333,7 +333,7 @@ class http { $this->response = curl_exec($ch); if ($this->response === false) { $this->response_info['http_code'] = 204; - $this->response_data = 'URL: ' . $url . ' error: ' . curl_error($ch) . ' (' . curl_errno($ch) . ')'; + $this->response_data = 'error: ' . curl_error($ch) . ' (' . curl_errno($ch) . ')URL: ' . $url; return false; } $this->response_info = curl_getinfo($ch); @@ -466,25 +466,14 @@ class http { curl_setopt($ch, CURLOPT_COOKIEFILE, $this->cookiefile); } - if (!empty($this->request_referer)) - curl_setopt($ch, CURLOPT_REFERER, $this->request_referer); $headers = array_merge($this->request_headeronce, $this->request_headerfixed); if ($headers) curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); $this->request_headeronce = array(); - if ($this->request_proxy) { - curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, true); - $host = $this->request_proxy['host']; - $host .= ($this->request_proxy['port']) ? ':' . $this->request_proxy['port'] : ''; - curl_setopt($ch, CURLOPT_PROXY, $host); - if (isset($this->request_proxy['user']) && isset($this->request_proxy['pass'])) { - curl_setopt($ch, CURLOPT_PROXYUSERPWD, $this->request_proxy['user'] . ':' . $this->request_proxy['pass']); - } - } $this->response = curl_exec($ch); if ($this->response === false) { $this->response_info['http_code'] = 204; - $this->response_data = 'URL: ' . $url . ' error: ' . curl_error($ch) . ' (' . curl_errno($ch) . ')'; + $this->response_data = 'error: ' . curl_error($ch) . ' (' . curl_errno($ch) . ')URL: ' . $url; return false; } $this->response_info = curl_getinfo($ch); @@ -502,64 +491,14 @@ class http { $this->response_header = array_pop($this->response_header); $this->response_header = explode("\r\n", $this->response_header); array_shift($this->response_header); //去掉第一行 - $purl = null; $header_assoc = array(); - foreach ($this->response_header as $header) { - $kv = explode(': ', $header, 2); - if (strtolower($kv[0]) == 'set-cookie') { - $header_assoc['Set-Cookie'][] = $kv[1]; - if (empty($this->cookiefile)) { - $cookieinfo = explode(';', $kv[1]); - //list($name, $value) = explode('=', array_shift($cookieinfo), 2); - $cookname = array_shift($cookieinfo); - $ind = strpos($cookname, '='); - if ($ind === false) - continue; - $cook = array(); - $cook['value'] = substr($cookname, $ind + 1); - $cook['name'] = trim(substr($cookname, 0, $ind)); - foreach ($cookieinfo as $key) { - $ind = strpos($key, '='); - if ($ind !== false) { - $val = substr($key, $ind + 1); - $key = strtolower(trim(substr($key, 0, $ind))); - } - if ($key == 'expires') { - $cook['expires'] = time($val); - if ($cook['expires'] < time()) - $cook['value'] = 'deleted'; - } else if ($key == 'path') - $cook['path'] = $val; - else if ($key == 'domain') - $cook['domain'] = $val; - } - if ($purl === null) { - $purl = parse_url($this->response_info['url']); - $doamin = $purl['host']; - if (isset($purl['path'])) - $path = $purl['path']; - else - $path = '/'; - } - if (!isset($cook['expires'])) - $cook['expires'] = 2114352000; - if (!isset($cook['domain'])) - $cook['domain'] = $doamin; - if (!isset($cook['path'])) - $cook['path'] = '/'; - $this->set_cookie($cook); - } - continue; - } - $header_assoc[$kv[0]] = $kv[1]; - } + $this->response_header = $header_assoc; curl_close($ch); $httpcode = toint($this->response_info['http_code']); if ($httpcode >= 300 && $httpcode < 400) { if ($this->response_info['redirect_url']) { $url = $this->response_info['redirect_url']; - $postdata = ''; continue; } } @@ -594,7 +533,7 @@ class http { if ($response === false) { clog(curl_error($ch) . ' (' . curl_errno($ch) . ')'); $this->response_info['http_code'] = 204; - $this->response_data = 'URL: ' . $url . ' error: ' . curl_error($ch) . ' (' . curl_errno($ch) . ')'; + $this->response_data = 'error: ' . curl_error($ch) . ' (' . curl_errno($ch) . ')URL: ' . $url; curl_close($ch); return false; }