例のExtJSとPHP

こんにちは



ExtJSで書き始めたとき、インターネット上にPHPコードの十分な例がなく、記事もありましたが、それらはすべて、PHPなしのExtJSコード(本の翻訳)があるという事実に要約されました。 したがって、私はこの記事を書くことにしました。



始めるために、ExtJSの初心者向けのヒントをいくつか紹介します。

最初: JavaScriptを知らないのですか? 時間をかけてJSに関する本を読んでください。

2番目: www.extjs.comにアクセスすると、PHPを使用したExtJSの良い例がたくさんあります。

3番目: ExtJSライブラリのドキュメントと例を使用します。



今、たとえば、実際に。 データベースに請求書ドキュメントを記録するための小さなプログラムを作成します。 請求書は、番号、日付、売り手のフィールド(データベースからのサンプル)、顧客フィールド(データベースからのサンプル)、商品の請求書テーブル、および既存の商品のテーブル(データベースから)で構成されます。 [保存]ボタンをクリックすると、請求書がデータベースに送信されます。

この例は、ExtJSとPHPの相互作用の基礎を理解するのに十分です。 それでは始めましょう。 フォームは次のようになります。



画像



まず、次のディレクトリとファイル構造を作成します。



画像



ext -ExtJSライブラリ

index.php-コメントなし:)

app.js-プログラム自体



また、さらにファイルがあります。



config.php-データベースへの接続

get_org.php-データベースから組織のリストをJSON形式で取得する

get_tovar.php-データベースから商品のリストをJSON形式で取得する

save.php-フォームをデータベースに保存します



コードindex.php:

< html > < head > < title > ExtJS PHP </ title > < meta http-equiv ="Content-Type" content ="text/html; charset=windows-1251" /> < link rel ="stylesheet" type ="text/css" href ="lib/ext/resources/css/ext-all.css" /> < script type ="text/javascript" src ="lib/ext/adapter/ext/ext-base.js" ></ script > <script type= "text/javascript" src= "lib/ext/ext-all.js" ></script> <script type= "text/javascript" src= "app.js" ></script> <style type= "text/css" > .movie_form { padding: 10px; } .movie-item { font:normal 12px tahoma, arial, helvetica, sans-serif; line-height:150%; padding:5px 20px 5px 10px; border:1px solid #fff; border-bottom:1px solid #eeeeee; white-space:normal; color:#555; } .movie-item h2 { display:block; font:inherit; font-weight:bold; color:#336699; } .movie-item h2 span { float : right; font-weight:normal; color:#555; margin:0 0 5px 5px; width:100px; display:block; clear:none; } </style> <script type= "text/javascript" src= "ext-lang-ru.js" > </ script > </ head > < body > < div > < div class ="movie_form" id ="form" ></ div > </ div > </ body > </ html > * This source code was highlighted with Source Code Highlighter .



  1. < html > < head > < title > ExtJS PHP </ title > < meta http-equiv ="Content-Type" content ="text/html; charset=windows-1251" /> < link rel ="stylesheet" type ="text/css" href ="lib/ext/resources/css/ext-all.css" /> < script type ="text/javascript" src ="lib/ext/adapter/ext/ext-base.js" ></ script > <script type= "text/javascript" src= "lib/ext/ext-all.js" ></script> <script type= "text/javascript" src= "app.js" ></script> <style type= "text/css" > .movie_form { padding: 10px; } .movie-item { font:normal 12px tahoma, arial, helvetica, sans-serif; line-height:150%; padding:5px 20px 5px 10px; border:1px solid #fff; border-bottom:1px solid #eeeeee; white-space:normal; color:#555; } .movie-item h2 { display:block; font:inherit; font-weight:bold; color:#336699; } .movie-item h2 span { float : right; font-weight:normal; color:#555; margin:0 0 5px 5px; width:100px; display:block; clear:none; } </style> <script type= "text/javascript" src= "ext-lang-ru.js" > </ script > </ head > < body > < div > < div class ="movie_form" id ="form" ></ div > </ div > </ body > </ html > * This source code was highlighted with Source Code Highlighter .



  2. < html > < head > < title > ExtJS PHP </ title > < meta http-equiv ="Content-Type" content ="text/html; charset=windows-1251" /> < link rel ="stylesheet" type ="text/css" href ="lib/ext/resources/css/ext-all.css" /> < script type ="text/javascript" src ="lib/ext/adapter/ext/ext-base.js" ></ script > <script type= "text/javascript" src= "lib/ext/ext-all.js" ></script> <script type= "text/javascript" src= "app.js" ></script> <style type= "text/css" > .movie_form { padding: 10px; } .movie-item { font:normal 12px tahoma, arial, helvetica, sans-serif; line-height:150%; padding:5px 20px 5px 10px; border:1px solid #fff; border-bottom:1px solid #eeeeee; white-space:normal; color:#555; } .movie-item h2 { display:block; font:inherit; font-weight:bold; color:#336699; } .movie-item h2 span { float : right; font-weight:normal; color:#555; margin:0 0 5px 5px; width:100px; display:block; clear:none; } </style> <script type= "text/javascript" src= "ext-lang-ru.js" > </ script > </ head > < body > < div > < div class ="movie_form" id ="form" ></ div > </ div > </ body > </ html > * This source code was highlighted with Source Code Highlighter .



  3. < html > < head > < title > ExtJS PHP </ title > < meta http-equiv ="Content-Type" content ="text/html; charset=windows-1251" /> < link rel ="stylesheet" type ="text/css" href ="lib/ext/resources/css/ext-all.css" /> < script type ="text/javascript" src ="lib/ext/adapter/ext/ext-base.js" ></ script > <script type= "text/javascript" src= "lib/ext/ext-all.js" ></script> <script type= "text/javascript" src= "app.js" ></script> <style type= "text/css" > .movie_form { padding: 10px; } .movie-item { font:normal 12px tahoma, arial, helvetica, sans-serif; line-height:150%; padding:5px 20px 5px 10px; border:1px solid #fff; border-bottom:1px solid #eeeeee; white-space:normal; color:#555; } .movie-item h2 { display:block; font:inherit; font-weight:bold; color:#336699; } .movie-item h2 span { float : right; font-weight:normal; color:#555; margin:0 0 5px 5px; width:100px; display:block; clear:none; } </style> <script type= "text/javascript" src= "ext-lang-ru.js" > </ script > </ head > < body > < div > < div class ="movie_form" id ="form" ></ div > </ div > </ body > </ html > * This source code was highlighted with Source Code Highlighter .



  4. < html > < head > < title > ExtJS PHP </ title > < meta http-equiv ="Content-Type" content ="text/html; charset=windows-1251" /> < link rel ="stylesheet" type ="text/css" href ="lib/ext/resources/css/ext-all.css" /> < script type ="text/javascript" src ="lib/ext/adapter/ext/ext-base.js" ></ script > <script type= "text/javascript" src= "lib/ext/ext-all.js" ></script> <script type= "text/javascript" src= "app.js" ></script> <style type= "text/css" > .movie_form { padding: 10px; } .movie-item { font:normal 12px tahoma, arial, helvetica, sans-serif; line-height:150%; padding:5px 20px 5px 10px; border:1px solid #fff; border-bottom:1px solid #eeeeee; white-space:normal; color:#555; } .movie-item h2 { display:block; font:inherit; font-weight:bold; color:#336699; } .movie-item h2 span { float : right; font-weight:normal; color:#555; margin:0 0 5px 5px; width:100px; display:block; clear:none; } </style> <script type= "text/javascript" src= "ext-lang-ru.js" > </ script > </ head > < body > < div > < div class ="movie_form" id ="form" ></ div > </ div > </ body > </ html > * This source code was highlighted with Source Code Highlighter .



  5. < html > < head > < title > ExtJS PHP </ title > < meta http-equiv ="Content-Type" content ="text/html; charset=windows-1251" /> < link rel ="stylesheet" type ="text/css" href ="lib/ext/resources/css/ext-all.css" /> < script type ="text/javascript" src ="lib/ext/adapter/ext/ext-base.js" ></ script > <script type= "text/javascript" src= "lib/ext/ext-all.js" ></script> <script type= "text/javascript" src= "app.js" ></script> <style type= "text/css" > .movie_form { padding: 10px; } .movie-item { font:normal 12px tahoma, arial, helvetica, sans-serif; line-height:150%; padding:5px 20px 5px 10px; border:1px solid #fff; border-bottom:1px solid #eeeeee; white-space:normal; color:#555; } .movie-item h2 { display:block; font:inherit; font-weight:bold; color:#336699; } .movie-item h2 span { float : right; font-weight:normal; color:#555; margin:0 0 5px 5px; width:100px; display:block; clear:none; } </style> <script type= "text/javascript" src= "ext-lang-ru.js" > </ script > </ head > < body > < div > < div class ="movie_form" id ="form" ></ div > </ div > </ body > </ html > * This source code was highlighted with Source Code Highlighter .



  6. < html > < head > < title > ExtJS PHP </ title > < meta http-equiv ="Content-Type" content ="text/html; charset=windows-1251" /> < link rel ="stylesheet" type ="text/css" href ="lib/ext/resources/css/ext-all.css" /> < script type ="text/javascript" src ="lib/ext/adapter/ext/ext-base.js" ></ script > <script type= "text/javascript" src= "lib/ext/ext-all.js" ></script> <script type= "text/javascript" src= "app.js" ></script> <style type= "text/css" > .movie_form { padding: 10px; } .movie-item { font:normal 12px tahoma, arial, helvetica, sans-serif; line-height:150%; padding:5px 20px 5px 10px; border:1px solid #fff; border-bottom:1px solid #eeeeee; white-space:normal; color:#555; } .movie-item h2 { display:block; font:inherit; font-weight:bold; color:#336699; } .movie-item h2 span { float : right; font-weight:normal; color:#555; margin:0 0 5px 5px; width:100px; display:block; clear:none; } </style> <script type= "text/javascript" src= "ext-lang-ru.js" > </ script > </ head > < body > < div > < div class ="movie_form" id ="form" ></ div > </ div > </ body > </ html > * This source code was highlighted with Source Code Highlighter .



  7. < html > < head > < title > ExtJS PHP </ title > < meta http-equiv ="Content-Type" content ="text/html; charset=windows-1251" /> < link rel ="stylesheet" type ="text/css" href ="lib/ext/resources/css/ext-all.css" /> < script type ="text/javascript" src ="lib/ext/adapter/ext/ext-base.js" ></ script > <script type= "text/javascript" src= "lib/ext/ext-all.js" ></script> <script type= "text/javascript" src= "app.js" ></script> <style type= "text/css" > .movie_form { padding: 10px; } .movie-item { font:normal 12px tahoma, arial, helvetica, sans-serif; line-height:150%; padding:5px 20px 5px 10px; border:1px solid #fff; border-bottom:1px solid #eeeeee; white-space:normal; color:#555; } .movie-item h2 { display:block; font:inherit; font-weight:bold; color:#336699; } .movie-item h2 span { float : right; font-weight:normal; color:#555; margin:0 0 5px 5px; width:100px; display:block; clear:none; } </style> <script type= "text/javascript" src= "ext-lang-ru.js" > </ script > </ head > < body > < div > < div class ="movie_form" id ="form" ></ div > </ div > </ body > </ html > * This source code was highlighted with Source Code Highlighter .



  8. < html > < head > < title > ExtJS PHP </ title > < meta http-equiv ="Content-Type" content ="text/html; charset=windows-1251" /> < link rel ="stylesheet" type ="text/css" href ="lib/ext/resources/css/ext-all.css" /> < script type ="text/javascript" src ="lib/ext/adapter/ext/ext-base.js" ></ script > <script type= "text/javascript" src= "lib/ext/ext-all.js" ></script> <script type= "text/javascript" src= "app.js" ></script> <style type= "text/css" > .movie_form { padding: 10px; } .movie-item { font:normal 12px tahoma, arial, helvetica, sans-serif; line-height:150%; padding:5px 20px 5px 10px; border:1px solid #fff; border-bottom:1px solid #eeeeee; white-space:normal; color:#555; } .movie-item h2 { display:block; font:inherit; font-weight:bold; color:#336699; } .movie-item h2 span { float : right; font-weight:normal; color:#555; margin:0 0 5px 5px; width:100px; display:block; clear:none; } </style> <script type= "text/javascript" src= "ext-lang-ru.js" > </ script > </ head > < body > < div > < div class ="movie_form" id ="form" ></ div > </ div > </ body > </ html > * This source code was highlighted with Source Code Highlighter .



  9. < html > < head > < title > ExtJS PHP </ title > < meta http-equiv ="Content-Type" content ="text/html; charset=windows-1251" /> < link rel ="stylesheet" type ="text/css" href ="lib/ext/resources/css/ext-all.css" /> < script type ="text/javascript" src ="lib/ext/adapter/ext/ext-base.js" ></ script > <script type= "text/javascript" src= "lib/ext/ext-all.js" ></script> <script type= "text/javascript" src= "app.js" ></script> <style type= "text/css" > .movie_form { padding: 10px; } .movie-item { font:normal 12px tahoma, arial, helvetica, sans-serif; line-height:150%; padding:5px 20px 5px 10px; border:1px solid #fff; border-bottom:1px solid #eeeeee; white-space:normal; color:#555; } .movie-item h2 { display:block; font:inherit; font-weight:bold; color:#336699; } .movie-item h2 span { float : right; font-weight:normal; color:#555; margin:0 0 5px 5px; width:100px; display:block; clear:none; } </style> <script type= "text/javascript" src= "ext-lang-ru.js" > </ script > </ head > < body > < div > < div class ="movie_form" id ="form" ></ div > </ div > </ body > </ html > * This source code was highlighted with Source Code Highlighter .



  10. < html > < head > < title > ExtJS PHP </ title > < meta http-equiv ="Content-Type" content ="text/html; charset=windows-1251" /> < link rel ="stylesheet" type ="text/css" href ="lib/ext/resources/css/ext-all.css" /> < script type ="text/javascript" src ="lib/ext/adapter/ext/ext-base.js" ></ script > <script type= "text/javascript" src= "lib/ext/ext-all.js" ></script> <script type= "text/javascript" src= "app.js" ></script> <style type= "text/css" > .movie_form { padding: 10px; } .movie-item { font:normal 12px tahoma, arial, helvetica, sans-serif; line-height:150%; padding:5px 20px 5px 10px; border:1px solid #fff; border-bottom:1px solid #eeeeee; white-space:normal; color:#555; } .movie-item h2 { display:block; font:inherit; font-weight:bold; color:#336699; } .movie-item h2 span { float : right; font-weight:normal; color:#555; margin:0 0 5px 5px; width:100px; display:block; clear:none; } </style> <script type= "text/javascript" src= "ext-lang-ru.js" > </ script > </ head > < body > < div > < div class ="movie_form" id ="form" ></ div > </ div > </ body > </ html > * This source code was highlighted with Source Code Highlighter .



  11. < html > < head > < title > ExtJS PHP </ title > < meta http-equiv ="Content-Type" content ="text/html; charset=windows-1251" /> < link rel ="stylesheet" type ="text/css" href ="lib/ext/resources/css/ext-all.css" /> < script type ="text/javascript" src ="lib/ext/adapter/ext/ext-base.js" ></ script > <script type= "text/javascript" src= "lib/ext/ext-all.js" ></script> <script type= "text/javascript" src= "app.js" ></script> <style type= "text/css" > .movie_form { padding: 10px; } .movie-item { font:normal 12px tahoma, arial, helvetica, sans-serif; line-height:150%; padding:5px 20px 5px 10px; border:1px solid #fff; border-bottom:1px solid #eeeeee; white-space:normal; color:#555; } .movie-item h2 { display:block; font:inherit; font-weight:bold; color:#336699; } .movie-item h2 span { float : right; font-weight:normal; color:#555; margin:0 0 5px 5px; width:100px; display:block; clear:none; } </style> <script type= "text/javascript" src= "ext-lang-ru.js" > </ script > </ head > < body > < div > < div class ="movie_form" id ="form" ></ div > </ div > </ body > </ html > * This source code was highlighted with Source Code Highlighter .



  12. < html > < head > < title > ExtJS PHP </ title > < meta http-equiv ="Content-Type" content ="text/html; charset=windows-1251" /> < link rel ="stylesheet" type ="text/css" href ="lib/ext/resources/css/ext-all.css" /> < script type ="text/javascript" src ="lib/ext/adapter/ext/ext-base.js" ></ script > <script type= "text/javascript" src= "lib/ext/ext-all.js" ></script> <script type= "text/javascript" src= "app.js" ></script> <style type= "text/css" > .movie_form { padding: 10px; } .movie-item { font:normal 12px tahoma, arial, helvetica, sans-serif; line-height:150%; padding:5px 20px 5px 10px; border:1px solid #fff; border-bottom:1px solid #eeeeee; white-space:normal; color:#555; } .movie-item h2 { display:block; font:inherit; font-weight:bold; color:#336699; } .movie-item h2 span { float : right; font-weight:normal; color:#555; margin:0 0 5px 5px; width:100px; display:block; clear:none; } </style> <script type= "text/javascript" src= "ext-lang-ru.js" > </ script > </ head > < body > < div > < div class ="movie_form" id ="form" ></ div > </ div > </ body > </ html > * This source code was highlighted with Source Code Highlighter .



  13. < html > < head > < title > ExtJS PHP </ title > < meta http-equiv ="Content-Type" content ="text/html; charset=windows-1251" /> < link rel ="stylesheet" type ="text/css" href ="lib/ext/resources/css/ext-all.css" /> < script type ="text/javascript" src ="lib/ext/adapter/ext/ext-base.js" ></ script > <script type= "text/javascript" src= "lib/ext/ext-all.js" ></script> <script type= "text/javascript" src= "app.js" ></script> <style type= "text/css" > .movie_form { padding: 10px; } .movie-item { font:normal 12px tahoma, arial, helvetica, sans-serif; line-height:150%; padding:5px 20px 5px 10px; border:1px solid #fff; border-bottom:1px solid #eeeeee; white-space:normal; color:#555; } .movie-item h2 { display:block; font:inherit; font-weight:bold; color:#336699; } .movie-item h2 span { float : right; font-weight:normal; color:#555; margin:0 0 5px 5px; width:100px; display:block; clear:none; } </style> <script type= "text/javascript" src= "ext-lang-ru.js" > </ script > </ head > < body > < div > < div class ="movie_form" id ="form" ></ div > </ div > </ body > </ html > * This source code was highlighted with Source Code Highlighter .



  14. < html > < head > < title > ExtJS PHP </ title > < meta http-equiv ="Content-Type" content ="text/html; charset=windows-1251" /> < link rel ="stylesheet" type ="text/css" href ="lib/ext/resources/css/ext-all.css" /> < script type ="text/javascript" src ="lib/ext/adapter/ext/ext-base.js" ></ script > <script type= "text/javascript" src= "lib/ext/ext-all.js" ></script> <script type= "text/javascript" src= "app.js" ></script> <style type= "text/css" > .movie_form { padding: 10px; } .movie-item { font:normal 12px tahoma, arial, helvetica, sans-serif; line-height:150%; padding:5px 20px 5px 10px; border:1px solid #fff; border-bottom:1px solid #eeeeee; white-space:normal; color:#555; } .movie-item h2 { display:block; font:inherit; font-weight:bold; color:#336699; } .movie-item h2 span { float : right; font-weight:normal; color:#555; margin:0 0 5px 5px; width:100px; display:block; clear:none; } </style> <script type= "text/javascript" src= "ext-lang-ru.js" > </ script > </ head > < body > < div > < div class ="movie_form" id ="form" ></ div > </ div > </ body > </ html > * This source code was highlighted with Source Code Highlighter .



  15. < html > < head > < title > ExtJS PHP </ title > < meta http-equiv ="Content-Type" content ="text/html; charset=windows-1251" /> < link rel ="stylesheet" type ="text/css" href ="lib/ext/resources/css/ext-all.css" /> < script type ="text/javascript" src ="lib/ext/adapter/ext/ext-base.js" ></ script > <script type= "text/javascript" src= "lib/ext/ext-all.js" ></script> <script type= "text/javascript" src= "app.js" ></script> <style type= "text/css" > .movie_form { padding: 10px; } .movie-item { font:normal 12px tahoma, arial, helvetica, sans-serif; line-height:150%; padding:5px 20px 5px 10px; border:1px solid #fff; border-bottom:1px solid #eeeeee; white-space:normal; color:#555; } .movie-item h2 { display:block; font:inherit; font-weight:bold; color:#336699; } .movie-item h2 span { float : right; font-weight:normal; color:#555; margin:0 0 5px 5px; width:100px; display:block; clear:none; } </style> <script type= "text/javascript" src= "ext-lang-ru.js" > </ script > </ head > < body > < div > < div class ="movie_form" id ="form" ></ div > </ div > </ body > </ html > * This source code was highlighted with Source Code Highlighter .



  16. < html > < head > < title > ExtJS PHP </ title > < meta http-equiv ="Content-Type" content ="text/html; charset=windows-1251" /> < link rel ="stylesheet" type ="text/css" href ="lib/ext/resources/css/ext-all.css" /> < script type ="text/javascript" src ="lib/ext/adapter/ext/ext-base.js" ></ script > <script type= "text/javascript" src= "lib/ext/ext-all.js" ></script> <script type= "text/javascript" src= "app.js" ></script> <style type= "text/css" > .movie_form { padding: 10px; } .movie-item { font:normal 12px tahoma, arial, helvetica, sans-serif; line-height:150%; padding:5px 20px 5px 10px; border:1px solid #fff; border-bottom:1px solid #eeeeee; white-space:normal; color:#555; } .movie-item h2 { display:block; font:inherit; font-weight:bold; color:#336699; } .movie-item h2 span { float : right; font-weight:normal; color:#555; margin:0 0 5px 5px; width:100px; display:block; clear:none; } </style> <script type= "text/javascript" src= "ext-lang-ru.js" > </ script > </ head > < body > < div > < div class ="movie_form" id ="form" ></ div > </ div > </ body > </ html > * This source code was highlighted with Source Code Highlighter .



  17. < html > < head > < title > ExtJS PHP </ title > < meta http-equiv ="Content-Type" content ="text/html; charset=windows-1251" /> < link rel ="stylesheet" type ="text/css" href ="lib/ext/resources/css/ext-all.css" /> < script type ="text/javascript" src ="lib/ext/adapter/ext/ext-base.js" ></ script > <script type= "text/javascript" src= "lib/ext/ext-all.js" ></script> <script type= "text/javascript" src= "app.js" ></script> <style type= "text/css" > .movie_form { padding: 10px; } .movie-item { font:normal 12px tahoma, arial, helvetica, sans-serif; line-height:150%; padding:5px 20px 5px 10px; border:1px solid #fff; border-bottom:1px solid #eeeeee; white-space:normal; color:#555; } .movie-item h2 { display:block; font:inherit; font-weight:bold; color:#336699; } .movie-item h2 span { float : right; font-weight:normal; color:#555; margin:0 0 5px 5px; width:100px; display:block; clear:none; } </style> <script type= "text/javascript" src= "ext-lang-ru.js" > </ script > </ head > < body > < div > < div class ="movie_form" id ="form" ></ div > </ div > </ body > </ html > * This source code was highlighted with Source Code Highlighter .



  18. < html > < head > < title > ExtJS PHP </ title > < meta http-equiv ="Content-Type" content ="text/html; charset=windows-1251" /> < link rel ="stylesheet" type ="text/css" href ="lib/ext/resources/css/ext-all.css" /> < script type ="text/javascript" src ="lib/ext/adapter/ext/ext-base.js" ></ script > <script type= "text/javascript" src= "lib/ext/ext-all.js" ></script> <script type= "text/javascript" src= "app.js" ></script> <style type= "text/css" > .movie_form { padding: 10px; } .movie-item { font:normal 12px tahoma, arial, helvetica, sans-serif; line-height:150%; padding:5px 20px 5px 10px; border:1px solid #fff; border-bottom:1px solid #eeeeee; white-space:normal; color:#555; } .movie-item h2 { display:block; font:inherit; font-weight:bold; color:#336699; } .movie-item h2 span { float : right; font-weight:normal; color:#555; margin:0 0 5px 5px; width:100px; display:block; clear:none; } </style> <script type= "text/javascript" src= "ext-lang-ru.js" > </ script > </ head > < body > < div > < div class ="movie_form" id ="form" ></ div > </ div > </ body > </ html > * This source code was highlighted with Source Code Highlighter .



  19. < html > < head > < title > ExtJS PHP </ title > < meta http-equiv ="Content-Type" content ="text/html; charset=windows-1251" /> < link rel ="stylesheet" type ="text/css" href ="lib/ext/resources/css/ext-all.css" /> < script type ="text/javascript" src ="lib/ext/adapter/ext/ext-base.js" ></ script > <script type= "text/javascript" src= "lib/ext/ext-all.js" ></script> <script type= "text/javascript" src= "app.js" ></script> <style type= "text/css" > .movie_form { padding: 10px; } .movie-item { font:normal 12px tahoma, arial, helvetica, sans-serif; line-height:150%; padding:5px 20px 5px 10px; border:1px solid #fff; border-bottom:1px solid #eeeeee; white-space:normal; color:#555; } .movie-item h2 { display:block; font:inherit; font-weight:bold; color:#336699; } .movie-item h2 span { float : right; font-weight:normal; color:#555; margin:0 0 5px 5px; width:100px; display:block; clear:none; } </style> <script type= "text/javascript" src= "ext-lang-ru.js" > </ script > </ head > < body > < div > < div class ="movie_form" id ="form" ></ div > </ div > </ body > </ html > * This source code was highlighted with Source Code Highlighter .



  20. < html > < head > < title > ExtJS PHP </ title > < meta http-equiv ="Content-Type" content ="text/html; charset=windows-1251" /> < link rel ="stylesheet" type ="text/css" href ="lib/ext/resources/css/ext-all.css" /> < script type ="text/javascript" src ="lib/ext/adapter/ext/ext-base.js" ></ script > <script type= "text/javascript" src= "lib/ext/ext-all.js" ></script> <script type= "text/javascript" src= "app.js" ></script> <style type= "text/css" > .movie_form { padding: 10px; } .movie-item { font:normal 12px tahoma, arial, helvetica, sans-serif; line-height:150%; padding:5px 20px 5px 10px; border:1px solid #fff; border-bottom:1px solid #eeeeee; white-space:normal; color:#555; } .movie-item h2 { display:block; font:inherit; font-weight:bold; color:#336699; } .movie-item h2 span { float : right; font-weight:normal; color:#555; margin:0 0 5px 5px; width:100px; display:block; clear:none; } </style> <script type= "text/javascript" src= "ext-lang-ru.js" > </ script > </ head > < body > < div > < div class ="movie_form" id ="form" ></ div > </ div > </ body > </ html > * This source code was highlighted with Source Code Highlighter .



  21. < html > < head > < title > ExtJS PHP </ title > < meta http-equiv ="Content-Type" content ="text/html; charset=windows-1251" /> < link rel ="stylesheet" type ="text/css" href ="lib/ext/resources/css/ext-all.css" /> < script type ="text/javascript" src ="lib/ext/adapter/ext/ext-base.js" ></ script > <script type= "text/javascript" src= "lib/ext/ext-all.js" ></script> <script type= "text/javascript" src= "app.js" ></script> <style type= "text/css" > .movie_form { padding: 10px; } .movie-item { font:normal 12px tahoma, arial, helvetica, sans-serif; line-height:150%; padding:5px 20px 5px 10px; border:1px solid #fff; border-bottom:1px solid #eeeeee; white-space:normal; color:#555; } .movie-item h2 { display:block; font:inherit; font-weight:bold; color:#336699; } .movie-item h2 span { float : right; font-weight:normal; color:#555; margin:0 0 5px 5px; width:100px; display:block; clear:none; } </style> <script type= "text/javascript" src= "ext-lang-ru.js" > </ script > </ head > < body > < div > < div class ="movie_form" id ="form" ></ div > </ div > </ body > </ html > * This source code was highlighted with Source Code Highlighter .



  22. < html > < head > < title > ExtJS PHP </ title > < meta http-equiv ="Content-Type" content ="text/html; charset=windows-1251" /> < link rel ="stylesheet" type ="text/css" href ="lib/ext/resources/css/ext-all.css" /> < script type ="text/javascript" src ="lib/ext/adapter/ext/ext-base.js" ></ script > <script type= "text/javascript" src= "lib/ext/ext-all.js" ></script> <script type= "text/javascript" src= "app.js" ></script> <style type= "text/css" > .movie_form { padding: 10px; } .movie-item { font:normal 12px tahoma, arial, helvetica, sans-serif; line-height:150%; padding:5px 20px 5px 10px; border:1px solid #fff; border-bottom:1px solid #eeeeee; white-space:normal; color:#555; } .movie-item h2 { display:block; font:inherit; font-weight:bold; color:#336699; } .movie-item h2 span { float : right; font-weight:normal; color:#555; margin:0 0 5px 5px; width:100px; display:block; clear:none; } </style> <script type= "text/javascript" src= "ext-lang-ru.js" > </ script > </ head > < body > < div > < div class ="movie_form" id ="form" ></ div > </ div > </ body > </ html > * This source code was highlighted with Source Code Highlighter .



  23. < html > < head > < title > ExtJS PHP </ title > < meta http-equiv ="Content-Type" content ="text/html; charset=windows-1251" /> < link rel ="stylesheet" type ="text/css" href ="lib/ext/resources/css/ext-all.css" /> < script type ="text/javascript" src ="lib/ext/adapter/ext/ext-base.js" ></ script > <script type= "text/javascript" src= "lib/ext/ext-all.js" ></script> <script type= "text/javascript" src= "app.js" ></script> <style type= "text/css" > .movie_form { padding: 10px; } .movie-item { font:normal 12px tahoma, arial, helvetica, sans-serif; line-height:150%; padding:5px 20px 5px 10px; border:1px solid #fff; border-bottom:1px solid #eeeeee; white-space:normal; color:#555; } .movie-item h2 { display:block; font:inherit; font-weight:bold; color:#336699; } .movie-item h2 span { float : right; font-weight:normal; color:#555; margin:0 0 5px 5px; width:100px; display:block; clear:none; } </style> <script type= "text/javascript" src= "ext-lang-ru.js" > </ script > </ head > < body > < div > < div class ="movie_form" id ="form" ></ div > </ div > </ body > </ html > * This source code was highlighted with Source Code Highlighter .



  24. < html > < head > < title > ExtJS PHP </ title > < meta http-equiv ="Content-Type" content ="text/html; charset=windows-1251" /> < link rel ="stylesheet" type ="text/css" href ="lib/ext/resources/css/ext-all.css" /> < script type ="text/javascript" src ="lib/ext/adapter/ext/ext-base.js" ></ script > <script type= "text/javascript" src= "lib/ext/ext-all.js" ></script> <script type= "text/javascript" src= "app.js" ></script> <style type= "text/css" > .movie_form { padding: 10px; } .movie-item { font:normal 12px tahoma, arial, helvetica, sans-serif; line-height:150%; padding:5px 20px 5px 10px; border:1px solid #fff; border-bottom:1px solid #eeeeee; white-space:normal; color:#555; } .movie-item h2 { display:block; font:inherit; font-weight:bold; color:#336699; } .movie-item h2 span { float : right; font-weight:normal; color:#555; margin:0 0 5px 5px; width:100px; display:block; clear:none; } </style> <script type= "text/javascript" src= "ext-lang-ru.js" > </ script > </ head > < body > < div > < div class ="movie_form" id ="form" ></ div > </ div > </ body > </ html > * This source code was highlighted with Source Code Highlighter .



  25. < html > < head > < title > ExtJS PHP </ title > < meta http-equiv ="Content-Type" content ="text/html; charset=windows-1251" /> < link rel ="stylesheet" type ="text/css" href ="lib/ext/resources/css/ext-all.css" /> < script type ="text/javascript" src ="lib/ext/adapter/ext/ext-base.js" ></ script > <script type= "text/javascript" src= "lib/ext/ext-all.js" ></script> <script type= "text/javascript" src= "app.js" ></script> <style type= "text/css" > .movie_form { padding: 10px; } .movie-item { font:normal 12px tahoma, arial, helvetica, sans-serif; line-height:150%; padding:5px 20px 5px 10px; border:1px solid #fff; border-bottom:1px solid #eeeeee; white-space:normal; color:#555; } .movie-item h2 { display:block; font:inherit; font-weight:bold; color:#336699; } .movie-item h2 span { float : right; font-weight:normal; color:#555; margin:0 0 5px 5px; width:100px; display:block; clear:none; } </style> <script type= "text/javascript" src= "ext-lang-ru.js" > </ script > </ head > < body > < div > < div class ="movie_form" id ="form" ></ div > </ div > </ body > </ html > * This source code was highlighted with Source Code Highlighter .



  26. < html > < head > < title > ExtJS PHP </ title > < meta http-equiv ="Content-Type" content ="text/html; charset=windows-1251" /> < link rel ="stylesheet" type ="text/css" href ="lib/ext/resources/css/ext-all.css" /> < script type ="text/javascript" src ="lib/ext/adapter/ext/ext-base.js" ></ script > <script type= "text/javascript" src= "lib/ext/ext-all.js" ></script> <script type= "text/javascript" src= "app.js" ></script> <style type= "text/css" > .movie_form { padding: 10px; } .movie-item { font:normal 12px tahoma, arial, helvetica, sans-serif; line-height:150%; padding:5px 20px 5px 10px; border:1px solid #fff; border-bottom:1px solid #eeeeee; white-space:normal; color:#555; } .movie-item h2 { display:block; font:inherit; font-weight:bold; color:#336699; } .movie-item h2 span { float : right; font-weight:normal; color:#555; margin:0 0 5px 5px; width:100px; display:block; clear:none; } </style> <script type= "text/javascript" src= "ext-lang-ru.js" > </ script > </ head > < body > < div > < div class ="movie_form" id ="form" ></ div > </ div > </ body > </ html > * This source code was highlighted with Source Code Highlighter .



  27. < html > < head > < title > ExtJS PHP </ title > < meta http-equiv ="Content-Type" content ="text/html; charset=windows-1251" /> < link rel ="stylesheet" type ="text/css" href ="lib/ext/resources/css/ext-all.css" /> < script type ="text/javascript" src ="lib/ext/adapter/ext/ext-base.js" ></ script > <script type= "text/javascript" src= "lib/ext/ext-all.js" ></script> <script type= "text/javascript" src= "app.js" ></script> <style type= "text/css" > .movie_form { padding: 10px; } .movie-item { font:normal 12px tahoma, arial, helvetica, sans-serif; line-height:150%; padding:5px 20px 5px 10px; border:1px solid #fff; border-bottom:1px solid #eeeeee; white-space:normal; color:#555; } .movie-item h2 { display:block; font:inherit; font-weight:bold; color:#336699; } .movie-item h2 span { float : right; font-weight:normal; color:#555; margin:0 0 5px 5px; width:100px; display:block; clear:none; } </style> <script type= "text/javascript" src= "ext-lang-ru.js" > </ script > </ head > < body > < div > < div class ="movie_form" id ="form" ></ div > </ div > </ body > </ html > * This source code was highlighted with Source Code Highlighter .



  28. < html > < head > < title > ExtJS PHP </ title > < meta http-equiv ="Content-Type" content ="text/html; charset=windows-1251" /> < link rel ="stylesheet" type ="text/css" href ="lib/ext/resources/css/ext-all.css" /> < script type ="text/javascript" src ="lib/ext/adapter/ext/ext-base.js" ></ script > <script type= "text/javascript" src= "lib/ext/ext-all.js" ></script> <script type= "text/javascript" src= "app.js" ></script> <style type= "text/css" > .movie_form { padding: 10px; } .movie-item { font:normal 12px tahoma, arial, helvetica, sans-serif; line-height:150%; padding:5px 20px 5px 10px; border:1px solid #fff; border-bottom:1px solid #eeeeee; white-space:normal; color:#555; } .movie-item h2 { display:block; font:inherit; font-weight:bold; color:#336699; } .movie-item h2 span { float : right; font-weight:normal; color:#555; margin:0 0 5px 5px; width:100px; display:block; clear:none; } </style> <script type= "text/javascript" src= "ext-lang-ru.js" > </ script > </ head > < body > < div > < div class ="movie_form" id ="form" ></ div > </ div > </ body > </ html > * This source code was highlighted with Source Code Highlighter .



  29. < html > < head > < title > ExtJS PHP </ title > < meta http-equiv ="Content-Type" content ="text/html; charset=windows-1251" /> < link rel ="stylesheet" type ="text/css" href ="lib/ext/resources/css/ext-all.css" /> < script type ="text/javascript" src ="lib/ext/adapter/ext/ext-base.js" ></ script > <script type= "text/javascript" src= "lib/ext/ext-all.js" ></script> <script type= "text/javascript" src= "app.js" ></script> <style type= "text/css" > .movie_form { padding: 10px; } .movie-item { font:normal 12px tahoma, arial, helvetica, sans-serif; line-height:150%; padding:5px 20px 5px 10px; border:1px solid #fff; border-bottom:1px solid #eeeeee; white-space:normal; color:#555; } .movie-item h2 { display:block; font:inherit; font-weight:bold; color:#336699; } .movie-item h2 span { float : right; font-weight:normal; color:#555; margin:0 0 5px 5px; width:100px; display:block; clear:none; } </style> <script type= "text/javascript" src= "ext-lang-ru.js" > </ script > </ head > < body > < div > < div class ="movie_form" id ="form" ></ div > </ div > </ body > </ html > * This source code was highlighted with Source Code Highlighter .



  30. < html > < head > < title > ExtJS PHP </ title > < meta http-equiv ="Content-Type" content ="text/html; charset=windows-1251" /> < link rel ="stylesheet" type ="text/css" href ="lib/ext/resources/css/ext-all.css" /> < script type ="text/javascript" src ="lib/ext/adapter/ext/ext-base.js" ></ script > <script type= "text/javascript" src= "lib/ext/ext-all.js" ></script> <script type= "text/javascript" src= "app.js" ></script> <style type= "text/css" > .movie_form { padding: 10px; } .movie-item { font:normal 12px tahoma, arial, helvetica, sans-serif; line-height:150%; padding:5px 20px 5px 10px; border:1px solid #fff; border-bottom:1px solid #eeeeee; white-space:normal; color:#555; } .movie-item h2 { display:block; font:inherit; font-weight:bold; color:#336699; } .movie-item h2 span { float : right; font-weight:normal; color:#555; margin:0 0 5px 5px; width:100px; display:block; clear:none; } </style> <script type= "text/javascript" src= "ext-lang-ru.js" > </ script > </ head > < body > < div > < div class ="movie_form" id ="form" ></ div > </ div > </ body > </ html > * This source code was highlighted with Source Code Highlighter .



  31. < html > < head > < title > ExtJS PHP </ title > < meta http-equiv ="Content-Type" content ="text/html; charset=windows-1251" /> < link rel ="stylesheet" type ="text/css" href ="lib/ext/resources/css/ext-all.css" /> < script type ="text/javascript" src ="lib/ext/adapter/ext/ext-base.js" ></ script > <script type= "text/javascript" src= "lib/ext/ext-all.js" ></script> <script type= "text/javascript" src= "app.js" ></script> <style type= "text/css" > .movie_form { padding: 10px; } .movie-item { font:normal 12px tahoma, arial, helvetica, sans-serif; line-height:150%; padding:5px 20px 5px 10px; border:1px solid #fff; border-bottom:1px solid #eeeeee; white-space:normal; color:#555; } .movie-item h2 { display:block; font:inherit; font-weight:bold; color:#336699; } .movie-item h2 span { float : right; font-weight:normal; color:#555; margin:0 0 5px 5px; width:100px; display:block; clear:none; } </style> <script type= "text/javascript" src= "ext-lang-ru.js" > </ script > </ head > < body > < div > < div class ="movie_form" id ="form" ></ div > </ div > </ body > </ html > * This source code was highlighted with Source Code Highlighter .



  32. < html > < head > < title > ExtJS PHP </ title > < meta http-equiv ="Content-Type" content ="text/html; charset=windows-1251" /> < link rel ="stylesheet" type ="text/css" href ="lib/ext/resources/css/ext-all.css" /> < script type ="text/javascript" src ="lib/ext/adapter/ext/ext-base.js" ></ script > <script type= "text/javascript" src= "lib/ext/ext-all.js" ></script> <script type= "text/javascript" src= "app.js" ></script> <style type= "text/css" > .movie_form { padding: 10px; } .movie-item { font:normal 12px tahoma, arial, helvetica, sans-serif; line-height:150%; padding:5px 20px 5px 10px; border:1px solid #fff; border-bottom:1px solid #eeeeee; white-space:normal; color:#555; } .movie-item h2 { display:block; font:inherit; font-weight:bold; color:#336699; } .movie-item h2 span { float : right; font-weight:normal; color:#555; margin:0 0 5px 5px; width:100px; display:block; clear:none; } </style> <script type= "text/javascript" src= "ext-lang-ru.js" > </ script > </ head > < body > < div > < div class ="movie_form" id ="form" ></ div > </ div > </ body > </ html > * This source code was highlighted with Source Code Highlighter .



  33. < html > < head > < title > ExtJS PHP </ title > < meta http-equiv ="Content-Type" content ="text/html; charset=windows-1251" /> < link rel ="stylesheet" type ="text/css" href ="lib/ext/resources/css/ext-all.css" /> < script type ="text/javascript" src ="lib/ext/adapter/ext/ext-base.js" ></ script > <script type= "text/javascript" src= "lib/ext/ext-all.js" ></script> <script type= "text/javascript" src= "app.js" ></script> <style type= "text/css" > .movie_form { padding: 10px; } .movie-item { font:normal 12px tahoma, arial, helvetica, sans-serif; line-height:150%; padding:5px 20px 5px 10px; border:1px solid #fff; border-bottom:1px solid #eeeeee; white-space:normal; color:#555; } .movie-item h2 { display:block; font:inherit; font-weight:bold; color:#336699; } .movie-item h2 span { float : right; font-weight:normal; color:#555; margin:0 0 5px 5px; width:100px; display:block; clear:none; } </style> <script type= "text/javascript" src= "ext-lang-ru.js" > </ script > </ head > < body > < div > < div class ="movie_form" id ="form" ></ div > </ div > </ body > </ html > * This source code was highlighted with Source Code Highlighter .



  34. < html > < head > < title > ExtJS PHP </ title > < meta http-equiv ="Content-Type" content ="text/html; charset=windows-1251" /> < link rel ="stylesheet" type ="text/css" href ="lib/ext/resources/css/ext-all.css" /> < script type ="text/javascript" src ="lib/ext/adapter/ext/ext-base.js" ></ script > <script type= "text/javascript" src= "lib/ext/ext-all.js" ></script> <script type= "text/javascript" src= "app.js" ></script> <style type= "text/css" > .movie_form { padding: 10px; } .movie-item { font:normal 12px tahoma, arial, helvetica, sans-serif; line-height:150%; padding:5px 20px 5px 10px; border:1px solid #fff; border-bottom:1px solid #eeeeee; white-space:normal; color:#555; } .movie-item h2 { display:block; font:inherit; font-weight:bold; color:#336699; } .movie-item h2 span { float : right; font-weight:normal; color:#555; margin:0 0 5px 5px; width:100px; display:block; clear:none; } </style> <script type= "text/javascript" src= "ext-lang-ru.js" > </ script > </ head > < body > < div > < div class ="movie_form" id ="form" ></ div > </ div > </ body > </ html > * This source code was highlighted with Source Code Highlighter .



  35. < html > < head > < title > ExtJS PHP </ title > < meta http-equiv ="Content-Type" content ="text/html; charset=windows-1251" /> < link rel ="stylesheet" type ="text/css" href ="lib/ext/resources/css/ext-all.css" /> < script type ="text/javascript" src ="lib/ext/adapter/ext/ext-base.js" ></ script > <script type= "text/javascript" src= "lib/ext/ext-all.js" ></script> <script type= "text/javascript" src= "app.js" ></script> <style type= "text/css" > .movie_form { padding: 10px; } .movie-item { font:normal 12px tahoma, arial, helvetica, sans-serif; line-height:150%; padding:5px 20px 5px 10px; border:1px solid #fff; border-bottom:1px solid #eeeeee; white-space:normal; color:#555; } .movie-item h2 { display:block; font:inherit; font-weight:bold; color:#336699; } .movie-item h2 span { float : right; font-weight:normal; color:#555; margin:0 0 5px 5px; width:100px; display:block; clear:none; } </style> <script type= "text/javascript" src= "ext-lang-ru.js" > </ script > </ head > < body > < div > < div class ="movie_form" id ="form" ></ div > </ div > </ body > </ html > * This source code was highlighted with Source Code Highlighter .



  36. < html > < head > < title > ExtJS PHP </ title > < meta http-equiv ="Content-Type" content ="text/html; charset=windows-1251" /> < link rel ="stylesheet" type ="text/css" href ="lib/ext/resources/css/ext-all.css" /> < script type ="text/javascript" src ="lib/ext/adapter/ext/ext-base.js" ></ script > <script type= "text/javascript" src= "lib/ext/ext-all.js" ></script> <script type= "text/javascript" src= "app.js" ></script> <style type= "text/css" > .movie_form { padding: 10px; } .movie-item { font:normal 12px tahoma, arial, helvetica, sans-serif; line-height:150%; padding:5px 20px 5px 10px; border:1px solid #fff; border-bottom:1px solid #eeeeee; white-space:normal; color:#555; } .movie-item h2 { display:block; font:inherit; font-weight:bold; color:#336699; } .movie-item h2 span { float : right; font-weight:normal; color:#555; margin:0 0 5px 5px; width:100px; display:block; clear:none; } </style> <script type= "text/javascript" src= "ext-lang-ru.js" > </ script > </ head > < body > < div > < div class ="movie_form" id ="form" ></ div > </ div > </ body > </ html > * This source code was highlighted with Source Code Highlighter .



  37. < html > < head > < title > ExtJS PHP </ title > < meta http-equiv ="Content-Type" content ="text/html; charset=windows-1251" /> < link rel ="stylesheet" type ="text/css" href ="lib/ext/resources/css/ext-all.css" /> < script type ="text/javascript" src ="lib/ext/adapter/ext/ext-base.js" ></ script > <script type= "text/javascript" src= "lib/ext/ext-all.js" ></script> <script type= "text/javascript" src= "app.js" ></script> <style type= "text/css" > .movie_form { padding: 10px; } .movie-item { font:normal 12px tahoma, arial, helvetica, sans-serif; line-height:150%; padding:5px 20px 5px 10px; border:1px solid #fff; border-bottom:1px solid #eeeeee; white-space:normal; color:#555; } .movie-item h2 { display:block; font:inherit; font-weight:bold; color:#336699; } .movie-item h2 span { float : right; font-weight:normal; color:#555; margin:0 0 5px 5px; width:100px; display:block; clear:none; } </style> <script type= "text/javascript" src= "ext-lang-ru.js" > </ script > </ head > < body > < div > < div class ="movie_form" id ="form" ></ div > </ div > </ body > </ html > * This source code was highlighted with Source Code Highlighter .



  38. < html > < head > < title > ExtJS PHP </ title > < meta http-equiv ="Content-Type" content ="text/html; charset=windows-1251" /> < link rel ="stylesheet" type ="text/css" href ="lib/ext/resources/css/ext-all.css" /> < script type ="text/javascript" src ="lib/ext/adapter/ext/ext-base.js" ></ script > <script type= "text/javascript" src= "lib/ext/ext-all.js" ></script> <script type= "text/javascript" src= "app.js" ></script> <style type= "text/css" > .movie_form { padding: 10px; } .movie-item { font:normal 12px tahoma, arial, helvetica, sans-serif; line-height:150%; padding:5px 20px 5px 10px; border:1px solid #fff; border-bottom:1px solid #eeeeee; white-space:normal; color:#555; } .movie-item h2 { display:block; font:inherit; font-weight:bold; color:#336699; } .movie-item h2 span { float : right; font-weight:normal; color:#555; margin:0 0 5px 5px; width:100px; display:block; clear:none; } </style> <script type= "text/javascript" src= "ext-lang-ru.js" > </ script > </ head > < body > < div > < div class ="movie_form" id ="form" ></ div > </ div > </ body > </ html > * This source code was highlighted with Source Code Highlighter .



  39. < html > < head > < title > ExtJS PHP </ title > < meta http-equiv ="Content-Type" content ="text/html; charset=windows-1251" /> < link rel ="stylesheet" type ="text/css" href ="lib/ext/resources/css/ext-all.css" /> < script type ="text/javascript" src ="lib/ext/adapter/ext/ext-base.js" ></ script > <script type= "text/javascript" src= "lib/ext/ext-all.js" ></script> <script type= "text/javascript" src= "app.js" ></script> <style type= "text/css" > .movie_form { padding: 10px; } .movie-item { font:normal 12px tahoma, arial, helvetica, sans-serif; line-height:150%; padding:5px 20px 5px 10px; border:1px solid #fff; border-bottom:1px solid #eeeeee; white-space:normal; color:#555; } .movie-item h2 { display:block; font:inherit; font-weight:bold; color:#336699; } .movie-item h2 span { float : right; font-weight:normal; color:#555; margin:0 0 5px 5px; width:100px; display:block; clear:none; } </style> <script type= "text/javascript" src= "ext-lang-ru.js" > </ script > </ head > < body > < div > < div class ="movie_form" id ="form" ></ div > </ div > </ body > </ html > * This source code was highlighted with Source Code Highlighter .



  40. < html > < head > < title > ExtJS PHP </ title > < meta http-equiv ="Content-Type" content ="text/html; charset=windows-1251" /> < link rel ="stylesheet" type ="text/css" href ="lib/ext/resources/css/ext-all.css" /> < script type ="text/javascript" src ="lib/ext/adapter/ext/ext-base.js" ></ script > <script type= "text/javascript" src= "lib/ext/ext-all.js" ></script> <script type= "text/javascript" src= "app.js" ></script> <style type= "text/css" > .movie_form { padding: 10px; } .movie-item { font:normal 12px tahoma, arial, helvetica, sans-serif; line-height:150%; padding:5px 20px 5px 10px; border:1px solid #fff; border-bottom:1px solid #eeeeee; white-space:normal; color:#555; } .movie-item h2 { display:block; font:inherit; font-weight:bold; color:#336699; } .movie-item h2 span { float : right; font-weight:normal; color:#555; margin:0 0 5px 5px; width:100px; display:block; clear:none; } </style> <script type= "text/javascript" src= "ext-lang-ru.js" > </ script > </ head > < body > < div > < div class ="movie_form" id ="form" ></ div > </ div > </ body > </ html > * This source code was highlighted with Source Code Highlighter .



  41. < html > < head > < title > ExtJS PHP </ title > < meta http-equiv ="Content-Type" content ="text/html; charset=windows-1251" /> < link rel ="stylesheet" type ="text/css" href ="lib/ext/resources/css/ext-all.css" /> < script type ="text/javascript" src ="lib/ext/adapter/ext/ext-base.js" ></ script > <script type= "text/javascript" src= "lib/ext/ext-all.js" ></script> <script type= "text/javascript" src= "app.js" ></script> <style type= "text/css" > .movie_form { padding: 10px; } .movie-item { font:normal 12px tahoma, arial, helvetica, sans-serif; line-height:150%; padding:5px 20px 5px 10px; border:1px solid #fff; border-bottom:1px solid #eeeeee; white-space:normal; color:#555; } .movie-item h2 { display:block; font:inherit; font-weight:bold; color:#336699; } .movie-item h2 span { float : right; font-weight:normal; color:#555; margin:0 0 5px 5px; width:100px; display:block; clear:none; } </style> <script type= "text/javascript" src= "ext-lang-ru.js" > </ script > </ head > < body > < div > < div class ="movie_form" id ="form" ></ div > </ div > </ body > </ html > * This source code was highlighted with Source Code Highlighter .



  42. < html > < head > < title > ExtJS PHP </ title > < meta http-equiv ="Content-Type" content ="text/html; charset=windows-1251" /> < link rel ="stylesheet" type ="text/css" href ="lib/ext/resources/css/ext-all.css" /> < script type ="text/javascript" src ="lib/ext/adapter/ext/ext-base.js" ></ script > <script type= "text/javascript" src= "lib/ext/ext-all.js" ></script> <script type= "text/javascript" src= "app.js" ></script> <style type= "text/css" > .movie_form { padding: 10px; } .movie-item { font:normal 12px tahoma, arial, helvetica, sans-serif; line-height:150%; padding:5px 20px 5px 10px; border:1px solid #fff; border-bottom:1px solid #eeeeee; white-space:normal; color:#555; } .movie-item h2 { display:block; font:inherit; font-weight:bold; color:#336699; } .movie-item h2 span { float : right; font-weight:normal; color:#555; margin:0 0 5px 5px; width:100px; display:block; clear:none; } </style> <script type= "text/javascript" src= "ext-lang-ru.js" > </ script > </ head > < body > < div > < div class ="movie_form" id ="form" ></ div > </ div > </ body > </ html > * This source code was highlighted with Source Code Highlighter .



  43. < html > < head > < title > ExtJS PHP </ title > < meta http-equiv ="Content-Type" content ="text/html; charset=windows-1251" /> < link rel ="stylesheet" type ="text/css" href ="lib/ext/resources/css/ext-all.css" /> < script type ="text/javascript" src ="lib/ext/adapter/ext/ext-base.js" ></ script > <script type= "text/javascript" src= "lib/ext/ext-all.js" ></script> <script type= "text/javascript" src= "app.js" ></script> <style type= "text/css" > .movie_form { padding: 10px; } .movie-item { font:normal 12px tahoma, arial, helvetica, sans-serif; line-height:150%; padding:5px 20px 5px 10px; border:1px solid #fff; border-bottom:1px solid #eeeeee; white-space:normal; color:#555; } .movie-item h2 { display:block; font:inherit; font-weight:bold; color:#336699; } .movie-item h2 span { float : right; font-weight:normal; color:#555; margin:0 0 5px 5px; width:100px; display:block; clear:none; } </style> <script type= "text/javascript" src= "ext-lang-ru.js" > </ script > </ head > < body > < div > < div class ="movie_form" id ="form" ></ div > </ div > </ body > </ html > * This source code was highlighted with Source Code Highlighter .



  44. < html > < head > < title > ExtJS PHP </ title > < meta http-equiv ="Content-Type" content ="text/html; charset=windows-1251" /> < link rel ="stylesheet" type ="text/css" href ="lib/ext/resources/css/ext-all.css" /> < script type ="text/javascript" src ="lib/ext/adapter/ext/ext-base.js" ></ script > <script type= "text/javascript" src= "lib/ext/ext-all.js" ></script> <script type= "text/javascript" src= "app.js" ></script> <style type= "text/css" > .movie_form { padding: 10px; } .movie-item { font:normal 12px tahoma, arial, helvetica, sans-serif; line-height:150%; padding:5px 20px 5px 10px; border:1px solid #fff; border-bottom:1px solid #eeeeee; white-space:normal; color:#555; } .movie-item h2 { display:block; font:inherit; font-weight:bold; color:#336699; } .movie-item h2 span { float : right; font-weight:normal; color:#555; margin:0 0 5px 5px; width:100px; display:block; clear:none; } </style> <script type= "text/javascript" src= "ext-lang-ru.js" > </ script > </ head > < body > < div > < div class ="movie_form" id ="form" ></ div > </ div > </ body > </ html > * This source code was highlighted with Source Code Highlighter .



  45. < html > < head > < title > ExtJS PHP </ title > < meta http-equiv ="Content-Type" content ="text/html; charset=windows-1251" /> < link rel ="stylesheet" type ="text/css" href ="lib/ext/resources/css/ext-all.css" /> < script type ="text/javascript" src ="lib/ext/adapter/ext/ext-base.js" ></ script > <script type= "text/javascript" src= "lib/ext/ext-all.js" ></script> <script type= "text/javascript" src= "app.js" ></script> <style type= "text/css" > .movie_form { padding: 10px; } .movie-item { font:normal 12px tahoma, arial, helvetica, sans-serif; line-height:150%; padding:5px 20px 5px 10px; border:1px solid #fff; border-bottom:1px solid #eeeeee; white-space:normal; color:#555; } .movie-item h2 { display:block; font:inherit; font-weight:bold; color:#336699; } .movie-item h2 span { float : right; font-weight:normal; color:#555; margin:0 0 5px 5px; width:100px; display:block; clear:none; } </style> <script type= "text/javascript" src= "ext-lang-ru.js" > </ script > </ head > < body > < div > < div class ="movie_form" id ="form" ></ div > </ div > </ body > </ html > * This source code was highlighted with Source Code Highlighter .



< html > < head > < title > ExtJS PHP </ title > < meta http-equiv ="Content-Type" content ="text/html; charset=windows-1251" /> < link rel ="stylesheet" type ="text/css" href ="lib/ext/resources/css/ext-all.css" /> < script type ="text/javascript" src ="lib/ext/adapter/ext/ext-base.js" ></ script > <script type= "text/javascript" src= "lib/ext/ext-all.js" ></script> <script type= "text/javascript" src= "app.js" ></script> <style type= "text/css" > .movie_form { padding: 10px; } .movie-item { font:normal 12px tahoma, arial, helvetica, sans-serif; line-height:150%; padding:5px 20px 5px 10px; border:1px solid #fff; border-bottom:1px solid #eeeeee; white-space:normal; color:#555; } .movie-item h2 { display:block; font:inherit; font-weight:bold; color:#336699; } .movie-item h2 span { float : right; font-weight:normal; color:#555; margin:0 0 5px 5px; width:100px; display:block; clear:none; } </style> <script type= "text/javascript" src= "ext-lang-ru.js" > </ script > </ head > < body > < div > < div class ="movie_form" id ="form" ></ div > </ div > </ body > </ html > * This source code was highlighted with Source Code Highlighter .







app.jsのコード:





  1. Ext.BLANK_IMAGE_URL = 'lib / ext / resources / images / default / s.gif' ;
  2. Ext.QuickTips.init();
*このソースコードは、 ソースコードハイライターで強調表示されました。


最初にプッシュします。





  1. // CombaBoxのテンプレート
  2. var _combo_tpl = 新しい Ext.XTemplate(
  3. '<tpl for = \ "。\"> <div class = \ "movie-item \">'
  4. '<h2> <span> ID:{id_org} </ span> {name} </ h2>'
  5. 'INN:{inn}'
  6. '</ div> </ tpl>'
  7. );
*このソースコードは、 ソースコードハイライターで強調表示されました。


ドロップダウンリストを表示するためのテンプレート。



画像





  1. //組織のリストを保存します
  2. var _store_saller = new Ext.data.Store({
  3. リーダー: new Ext.data.JsonReader({root: 'rows' 、id: 'id_org' 、fields:[ 'id_org''name''inn' ]})、
  4. プロキシ: 新しい Ext.data.HttpProxy({url: 'get_org.php' })
  5. });
*このソースコードは、 ソースコードハイライターで強調表示されました。


組織のリストのデータウェアハウスであるget_org.phpスクリプトを介してデータベースからデータを取得すると、スクリプトはJSONレスポンスを返します。 スクリプトの例を以下に示します。





  1. // ComboBoxフィールドセラー
  2. var _combo_saller = {
  3. xtype: 'combo' 、名前: 'prod' 、fieldLabel: 'Seller' 、store:_store_saller、anchor: '100%' 、emptyText: 'Select ...'
  4. valueField: 'id_org' 、displayField: 'name' 、モード: 'remote' 、triggerAction: 'all'
  5. tpl:_combo_tpl、itemSelector: 'div.movi​​e-item' 、minChars:2
  6. }
  7. // ComboBox Field Buyer
  8. var _combo_bayer = {
  9. xtype: 'combo' 、名前: 'pok' 、fieldLabel: 'Buyer' 、store:_store_saller、anchor: '100%' 、emptyText: 'Select ...'
  10. valueField: 'id_org' 、displayField: 'name' 、モード: 'remote' 、triggerAction: 'all'
  11. tpl:_combo_tpl、itemSelector: 'div.movi​​e-item' 、minChars:2
  12. }
*このソースコードは、 ソースコードハイライターで強調表示されました。


売り手と買い手のリストのコンボボックス。 tpl:_combo_tpl-ここでは、事前に準備されたテンプレートを使用します。





  1. //現在のドキュメントの製品リスト用のストレージ
  2. var _store_tovar = new Ext.data.JsonStore({
  3. ルート: 'tovar'
  4. フィールド:[
  5. {名前: 'id' 、タイプ: 'float' }、
  6. {名前: '名前' }、
  7. {名前: 'col' 、タイプ: 'float' }、
  8. {名前: '価格' 、タイプ: 'フロート' }
  9. ]
  10. });
  11. //すべての製品のリスト用のストレージ
  12. var _store_tovar_all = new Ext.data.JsonStore({
  13. url: 'get_tovar.php'
  14. ルート: 'tovar'
  15. フィールド:[
  16. {名前: 'id' 、タイプ: 'float' }、
  17. {名前: '名前' }、
  18. {名前: 'col' 、タイプ: 'float' }、
  19. {名前: '価格' 、タイプ: 'フロート' }
  20. ]、
  21. autoLoad: true
  22. });
*このソースコードは、 ソースコードハイライターで強調表示されました。


すべての製品のリストのストレージ(_store_tovar_all)は、スクリプトget_tovar.phpを介してデータベースからデータを受信し、スクリプトはJSONを返します。 グリッド内のデータを正しくソートするには、type: 'float'パラメーターがより必要です。





  1. //グリッド_grid_tovarのフィールド
  2. var _grid_columns = [
  3. {header: "ID" 、width:30、dataIndex: 'id' 、sortable: true 、hidden: true }、
  4. {id: 'title' 、ヘッダー: "Name" 、幅:180、dataIndex: 'name' 、ソート可能: true }、
  5. {header: "Quantity" 、幅:85、dataIndex: 'col' 、ソート可能: true }、
  6. {ヘッダー: "価格" 、幅:85、dataIndex: '価格' 、ソート可能: true 、align: '中央' }
  7. ]
  8. //グリッドのフィールド_grid_tovar_all
  9. var _grid_columns_all = [
  10. {header: "ID" 、width:30、dataIndex: 'id' 、sortable: true 、hidden: true }、
  11. {id: 'title' 、ヘッダー: "Name" 、幅:180、dataIndex: 'name' 、ソート可能: true }、
  12. {header: "Quantity" 、幅:85、dataIndex: 'col' 、ソート可能: true }、
  13. {ヘッダー: "価格" 、幅:85、dataIndex: '価格' 、ソート可能: true 、align: '中央' }
  14. ]
*このソースコードは、 ソースコードハイライターで強調表示されました。


グリッドで使用されるフィールド。





  1. //現在のドキュメントの商品リストのグリッド
  2. var _grid_tovar = new Ext.grid.GridPanel({
  3. store:_store_tovar、 //ストレージ
  4. enableDragDrop: true
  5. ddGroup: '_grid_tovar_DDGroup'
  6. 列:_grid_columns、
  7. stripeRows: true
  8. autoExpandColumn: 'title'
  9. フレーム: true
  10. 高さ:200、
  11. loadMask: true
  12. columnLines: true
  13. clicksToEdit:1
  14. // border:false、
  15. tbar:{
  16. アイテム:[
  17. {
  18. テキスト: 'Clear'
  19. ハンドラー: 関数 (){
  20. _grid_tovar.getView()。refresh();
  21. _grid_tovar_all.getView()。refresh();
  22. _grid_tovar.store.removeAll();
  23. }
  24. }、{
  25. テキスト: 「位置を削除」
  26. ハンドラー: 関数 (){
  27. var s = _grid_tovar.getSelectionModel()。getSelections();
  28. forvar i = 0、r; r = s [i]; i ++){
  29. _grid_tovar.store.remove(r);
  30. }
  31. }
  32. }
  33. ]
  34. }
  35. });
*このソースコードは、 ソースコードハイライターで強調表示されました。


ドキュメントの商品リストのグリッド。グリッドをクリアし、選択した位置を削除するボタンがあります。





  1. //すべての製品のリストのグリッド
  2. var _grid_tovar_all = new Ext.grid.GridPanel({
  3. ストア:_store_tovar_all、
  4. enableDragDrop: true
  5. ddGroup: '_grid_tovar_all_DDGroup'
  6. 列:_grid_columns_all、
  7. stripeRows: true
  8. autoExpandColumn: 'title'
  9. フレーム: true
  10. 高さ:200、
  11. loadMask: true
  12. columnLines: true
  13. リスナー:{
  14. rowdblclick: function (_grid_tovar_all、row、e){
  15. var record_all = _grid_tovar_all.getStore()。getAt(row);
  16. var rec = record_all.copy();
  17. var _button = new Ext.Button({
  18. テキスト: '保存'
  19. ハンドラー: 関数 (){
  20. rec.data [ 'col' ] = _panel.getForm()。findField( 'fcol' ).getValue( true );
  21. rec.data [ 'price' ] = _panel.getForm()。findField( 'fprice' ).getValue( true );
  22. _grid_tovar.store.insert(0、rec);
  23. _grid_tovar.getView()。refresh();
  24. _win.close();
  25. }
  26. })
  27. var _panel = new Ext.FormPanel({
  28. ボーダー: false 、フレーム: true
  29. アイテム:[
  30. {xtype: 'textfield' 、名前: 'fcol' 、fieldLabel: 'Quantity' 、値: '1' }、 // selectOnFocus:true}、
  31. {xtype: 'textfield' 、名前: 'fprice' 、fieldLabel: 'Price' 、値:rec.get( 'price' )} //、selectOnFocus:true}
  32. ]
  33. })
  34. var _win = new Ext.Window({
  35. タイトル:rec.get( 'name' )、
  36. ボーダー: false 、サイズ変更可能: false 、幅:270、
  37. アイテム:[_panel]、
  38. ボタン:[_button]、
  39. キー:[{
  40. key:13、 //キーを入力
  41. ハンドラー: 関数 (){
  42. _button.focus();
  43. }
  44. }]、
  45. リスナー:{
  46. activate: function (){
  47. _panel.getForm()。findField( 'fcol' ).focus( true 、250);
  48. }
  49. }
  50. })。show();
  51. }
  52. }、
  53. キー:[
  54. {
  55. key:27、 // Escキー
  56. ハンドラー: 関数 (){
  57. アラート( 'Esc' );
  58. }
  59. }、{
  60. key:13、 //キーを入力
  61. ハンドラー: 関数 (){
  62. アラート( 'Enter' );
  63. }
  64. }
  65. ]
  66. });
*このソースコードは、 ソースコードハイライターで強調表示されました。


すべての製品のリストのグリッド。 rowdblclickは、グリッド上のダブルクリックイベントです。 クリックすると、ウィンドウ(_win)が開き、商品の数量と価格が入力されます。 ウィンドウの「保存」または「ENTER」ボタンをクリックすると、すでに調整されたデータがドキュメント内の商品リストのグリッドに収まります。 キー-キーを使用してグリッドで作業する例としてここに与えられます。 key:13、//ハンドラーでEnterキーを押すと、グリッドをダブルクリックしたときと同じように、ENTERボタンのイベントを登録できます。





  1. Ext.onReady( function (){
*このソースコードは、 ソースコードハイライターで強調表示されました。


フォームの生成を開始します。





  1. //ドキュメントのメインフォーム
  2. var _form_sf = new Ext.FormPanel({
  3. id: 'id_form_sf'
  4. url: 'save.php'
  5. renderTo: 'form'
  6. フレーム: true
  7. タイトル: '請求書'
  8. 幅:600、
  9. アイテム:[
  10. {
  11. レイアウト: 'column'
  12. アイテム:[
  13. {
  14. columnWidth:.6、
  15. レイアウト: 'form'
  16. アイテム:[{xtype: 'textfield' 、id: 'track-tip-num' 、name: 'title' 、fieldLabel: 'Number' 、anchor: '95% ' }]
  17. }、{
  18. columnWidth:.4、
  19. レイアウト: 'form'
  20. labelWidth:40、
  21. アイテム:[{xtype: 'datefield' 、id: 'track-tip-data' 、name: 'date' 、fieldLabel: 'Date' 、anchor: '100%' }]
  22. }
  23. ]
  24. }、
  25. _combo_saller、
  26. _combo_bayer、
  27. _grid_tovar、
  28. _grid_tovar_all
  29. ]、
  30. ボタン:[
  31. {
  32. テキスト: '保存'
  33. ハンドラー: 関数 (){
  34. var modifiedRecords = _grid_tovar.store.getRange();
  35. if (modifiedRecords.length> 0){
  36. var jsonData = "[" ;
  37. jsonData + = Ext.util.JSON.encode(modifiedRecords [0] .data);
  38. forvar cnt = 1; cnt <modifiedRecords.length; cnt ++){
  39. var record = modifiedRecords [cnt];
  40. jsonData + = '、' + Ext.util.JSON.encode(record.data);
  41. }
  42. jsonData = jsonData.substring(0、jsonData.length)+ "]" ;
  43. };
  44. _form_sf.getForm()。submit({
  45. // waitMsg: 'データを転送しています...'、
  46. params :{
  47. prod_id:_form_sf.getForm()。findField( 'prod' ).getValue( true )、
  48. pok_id:_form_sf.getForm()。findField( 'pok' ).getValue( true )、
  49. データ:jsonData
  50. }、
  51. 成功: 関数 (f、a){
  52. Ext.Msg.alert( 'Finish' 、a.result.truemsg);
  53. }、
  54. 失敗: 関数 (f、a){
  55. Ext.Msg.alert( 'Error' 、a.result.errormsg);
  56. }
  57. })
  58. }
  59. }、{
  60. テキスト: 'Clear'
  61. ハンドラー: 関数 (){
  62. _form_sf.getForm()。reset();
  63. _grid_tovar.store.removeAll();
  64. }
  65. }
  66. ]
  67. });
*このソースコードは、 ソースコードハイライターで強調表示されました。


ドキュメントのメインフォームは次のとおりです。 save.phpは、データを保存するためのスクリプトです。 _combo_saller、_combo_bayer、_grid_tovar、_grid_tovar_allは、以前に準備したデータです。 「保存」ボタンをクリックすると、ドキュメントの商品グリッドからJSON形式のjsonData変数が生成されます。これには、ドキュメントの商品グリッドが含まれています。 次に、パラメーター(params :)が準備され、 save.phpスクリプトに渡されますが、デフォルトではフォームに渡されません。 パラメーターprod_id、pok_idおよびdata。 実際には、コンボボックスからデフォルトで表示されるデータがフォーム、具体的には組織の名前(displayField: 'name')で転送され、ID値(valueField: 'id_org')が必要です。ここでは、それらを個別に取得して渡します(prod_id:_form_sf getForm()。findField( 'prod')。getValue(true)など)。 その後、 save.phpスクリプトが処理し、成功が成功したか(成功:)失敗したか(失敗:)に関する情報を提供する応答を取得します。スクリプトはフォームの特定のフィールドにエラーを返すこともできます。 save.phpの例を以下に示します。





  1. // _grid_tovarの構成をドラッグアンドドロップします
  2. var firstGridDropTargetEl = _grid_tovar.getView()。scroller.dom;
  3. var firstGridDropTarget = new Ext.dd.DropTarget(firstGridDropTargetEl、{
  4. ddGroup: '_grid_tovar_all_DDGroup'
  5. notifyDrop: 関数 (ddSource、e、データ){
  6. var records = ddSource.dragData.selections;
  7. _grid_tovar.store.insert(0、レコード);
  8. _grid_tovar.getView()。refresh();
  9. 真を 返す
  10. }
  11. });
  12. // _grid_tovar_allの構成をドラッグアンドドロップします
  13. var secondGridDropTargetEl = _grid_tovar_all.getView()。scroller.dom;
  14. var secondGridDropTarget = new Ext.dd.DropTarget(secondGridDropTargetEl、{
  15. ddGroup: '_grid_tovar_DDGroup'
  16. notifyDrop: 関数 (ddSource、e、データ){
  17. var records = ddSource.dragData.selections;
  18. Ext.each(レコード、ddSource.grid.store.remove、ddSource.grid.store);
  19. _grid_tovar_all.getView()。refresh();
  20. 真を 返す
  21. }
  22. });
  23. })
*このソースコードは、 ソースコードハイライターで強調表示されました。


そして最後に、グリッドのドラッグアンドドロップの動作の構成。



次に、PHPコードなどについて説明します。



Config.phpコード: (DBセットアップ)





  1. <?php
  2. $ db_server = "localhost" ; // DBホスト
  3. $ db_user = "root" ; // DBログイン
  4. $ db_password = "" ; // DBパスワード
  5. $ db_dbname = "online" ; // DB名
  6. $ connect = @mysql_connect($ db_server、$ db_user、$ db_password) //接続を作成します(識別子$ connect)
  7. またはdie( "MySQLに接続できませんでした:<br>" 。mysql_error()。 "<br>" 。mysql_errno());
  8. $ db = @mysql_select_db($ db_dbname、$ connect) //データベースを選択
  9. またはdie( "データベースを選択できませんでした:<br>" 。mysql_error()。 "<br>" 。mysql_errno());
*このソースコードは、 ソースコードハイライターで強調表示されました。


コードget_org.php:(組織のリストを取得)





  1. <?php
  2. require( 'config.php' );
  3. $ cmd = iconv( 'UTF-8''WINDOWS-1251' 、$ _POST [ 'query' ]); //コンボボックスからのリクエスト
  4. $ query = 'SELECT id_org、name、inn FROM `organizatsii` WHERE` name` LIKE \'% ' 。$ cmd。 '%\' ORDER BY名 ' ;
  5. $ query2 = 'SELECT id_org、name、inn FROM `organizatsii` WHERE` inn` LIKE \'% ' 。$ cmd。 '%\' ORDER BY名 ' ;
  6. $ result = @mysql_query($ query、$ connect)or die( "クエリを実行できませんでした:<br>" 。mysql_error()。 "<br>" 。mysql_errno());
  7. if (mysql_num_rows($ result)== 0){
  8. $ result = @mysql_query($ query2、$ connect)またはdie( "クエリを実行できませんでした:<br>" 。mysql_error()。 "<br>" 。mysql_errno());
  9. }
  10. while ($ row = mysql_fetch_array($ result)):
  11. $ row [ "name" ] = iconv( 'WINDOWS-1251''UTF-8' 、$ row [ "name" ]);
  12. $ arr [] = $行;
  13. 終わり;
  14. $ u2koi =配列
  15. '\ u0430' => 'a''\ u0410' => 'A'
  16. '\ u0431' => 'b''\ u0411' => 'B'
  17. '\ u0432' => 'in''\ u0412' => 'in'
  18. '\ u0433' => 'g''\ u0413' => 'G'
  19. '\ u0434' => 'd''\ u0414' => 'D'
  20. '\ u0435' => 'e''\ u0415' => 'E'
  21. '\ u0451' => '''\ u0401' => ' '
  22. '\ u0436' => 'f''\ u0416' => 'f '
  23. '\ u0437' => 'h''\ u0417' => ' h '
  24. '\ u0438' => 'and''\ u0418' => 'And'
  25. '\ u0439' => 'th''\ u0419' => 'th'
  26. '\ u043a' => 'k''\ u041a' => 'K'
  27. '\ u043b' => 'l''\ u041b' => 'l '
  28. '\ u043c' => 'm''\ u041c' => 'M'
  29. '\ u043d' => 'n''\ u041d' => 'H'
  30. '\ u043e' => 'o''\ u041e' => 'O'
  31. '\ u043f' => 'n''\ u041f' => 'P'
  32. '\ u0440' => 'p''\ u0420' => 'P'
  33. '\ u0441' => 'c''\ u0421' => 'C'
  34. '\ u0442' => 't''\ u0422' => 'T'
  35. '\ u0443' => 'y''\ u0423' => 'y'
  36. '\ u0444' => 'f''\ u0424' => 'f '
  37. '\ u0445' => 'x''\ u0425' => 'X'
  38. '\ u0446' => 'ts''\ u0426' => 'ts '
  39. '\ u0447' => 'h''\ u0427' => 'h '
  40. '\ u0448' => 'w''\ u0428' => 'w'
  41. '\ u0449' => '''\ u0429' => ''
  42. '\ u044a' => 'b''\ u042a' => 'b'
  43. '\ u044b' => 's''\ u042b' => 's'
  44. '\ u044c' => 'b''\ u042c' => 'b'
  45. '\ u044d' => 'e''\ u042d' => 'E'
  46. '\ u044e' => 'u''\ u042e' => ' u '
  47. '\ u044f' => 'I''\ u042f' => 'I'
  48. '\ r' => ''
  49. '\ n' => '<br />'
  50. '\ t' => ''
  51. );
  52. echo '{rows:' .strtr(json_encode($ arr)、$ u2koi)。 '}' ;
  53. ?>
*このソースコードは、 ソースコードハイライターで強調表示されました。


$ _POST ['query']-コンボボックスに何かを書き込むときに送信されるリクエスト(フィルター)。 コンボボックスに(minChars:2)があります。つまり、コンボボックスに3文字以上を書き込むと、リポジトリが更新され(リポジトリスクリプトが再度実行され、get_org.phpが実行されます)、クエリがスクリプトに送信されます。 したがって、データベースから組織のリストをフィルタリングできます。

$ u2koi = array ...-データベースからロシア語のテキストを正しく取得するために使用されます。



コードget_tovar.php:(製品のリストを取得)





  1. <?php
  2. require( 'config.php' );
  3. $ query = 'SELECT id、name、col、price FROM `tovar` ORDER BY name' ;
  4. $ result = @mysql_query($ query、$ connect)or die( "クエリを実行できませんでした:<br>" 。mysql_error()。 "<br>" 。mysql_errno());
  5. while ($ row = mysql_fetch_array($ result)):
  6. $ row [ "name" ] = iconv( 'WINDOWS-1251''UTF-8' 、$ row [ "name" ]);
  7. $ arr [] = $行;
  8. 終わり;
  9. $ u2koi =配列
  10. '\ u0430' => 'a''\ u0410' => 'A'
  11. '\ u0431' => 'b''\ u0411' => 'B'
  12. '\ u0432' => 'in''\ u0412' => 'in'
  13. '\ u0433' => 'g''\ u0413' => 'G'
  14. '\ u0434' => 'd''\ u0414' => 'D'
  15. '\ u0435' => 'e''\ u0415' => 'E'
  16. '\ u0451' => '''\ u0401' => ' '
  17. '\ u0436' => 'f''\ u0416' => 'f '
  18. '\ u0437' => 'h''\ u0417' => ' h '
  19. '\ u0438' => 'and''\ u0418' => 'And'
  20. '\ u0439' => 'th''\ u0419' => 'th'
  21. '\ u043a' => 'k''\ u041a' => 'K'
  22. '\ u043b' => 'l''\ u041b' => 'l '
  23. '\ u043c' => 'm''\ u041c' => 'M'
  24. '\ u043d' => 'n''\ u041d' => 'H'
  25. '\ u043e' => 'o''\ u041e' => 'O'
  26. '\ u043f' => 'n''\ u041f' => 'P'
  27. '\ u0440' => 'p''\ u0420' => 'P'
  28. '\ u0441' => 'c''\ u0421' => 'C'
  29. '\ u0442' => 't''\ u0422' => 'T'
  30. '\ u0443' => 'y''\ u0423' => 'y'
  31. '\ u0444' => 'f''\ u0424' => 'f '
  32. '\ u0445' => 'x''\ u0425' => 'X'
  33. '\ u0446' => 'ts''\ u0426' => 'ts '
  34. '\ u0447' => 'h''\ u0427' => 'h '
  35. '\ u0448' => 'w''\ u0428' => 'w'
  36. '\ u0449' => '''\ u0429' => ''
  37. '\ u044a' => 'b''\ u042a' => 'b'
  38. '\ u044b' => 's''\ u042b' => 's'
  39. '\ u044c' => 'b''\ u042c' => 'b'
  40. '\ u044d' => 'e''\ u042d' => 'E'
  41. '\ u044e' => 'u''\ u042e' => ' u '
  42. '\ u044f' => 'I''\ u042f' => 'I'
  43. '\ r' => ''
  44. '\ n' => '<br />'
  45. '\ t' => ''
  46. );
  47. echo '{tovar:' .strtr(json_encode($ arr)、$ u2koi)。 '}' ;
  48. ?>
*このソースコードは、 ソースコードハイライターで強調表示されました。


コードsave.php:(および保存)

<?PHP

$title = iconv('UTF-8', 'WINDOWS-1251', $_POST['title']);

$date = iconv('UTF-8', 'WINDOWS-1251', $_POST['date']);

$prod_id = iconv('UTF-8', 'WINDOWS-1251', $_POST['prod_id']);

$prod = iconv('UTF-8', 'WINDOWS-1251', $_POST['prod']);

$pok_id = iconv('UTF-8', 'WINDOWS-1251', $_POST['pok_id']);

$pok = iconv('UTF-8', 'WINDOWS-1251', $_POST['pok']);

$data = iconv('UTF-8', 'WINDOWS-1251', $_POST['data']);

if (($title == '') or ($date == '') or ($data == '')) $success = "false"; else $success = "true";

if ($title == '') {$err_title = "title: \" '' \","; $err_title_msg = " <br>";}

if ($date == '') {$err_date = "date: \" '' \","; $err_date_msg = " <br>";}

if ($data == '') {$err_data_msg = " ";}

print "{success: " .$success. ",errors: {".$err_title."".$err_date."null: \"null\"}, truemsg: \" : " .$title. ", : " .$date. " <br> : " .$prod. "<br> : " .$prod_id. "<br> : " .$pok. "<br> : " .$pok_id. "<br> : ".$data."\",errormsg:\"".$err_title_msg."".$err_date_msg."".$err_data_msg."\"}";

?>








データベースを作成するためのソースコードはアップロードしませんが、スクリプトから、使用されているテーブルとフィールドを確認できます。 必要に応じて、フィールドを追加または変更できます。 そして、save.phpスクリプトを必要に応じて書き換えます。 この記事は初心者向けの一種のテンプレートです。



さて、これですべてです。 ご清聴ありがとうございました :) ExtJSでの執筆をお楽しみください。



All Articles