[Smartupload-svn] [50] user_form. php - 登録ミスの際の、国の初期表示を修正

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2011年 5月 28日 (土) 23:28:14 JST


Revision: 50
          http://sourceforge.jp/projects/smartupload/svn/view?view=rev&revision=50
Author:   hryksbt
Date:     2011-05-28 23:28:14 +0900 (Sat, 28 May 2011)

Log Message:
-----------
user_form.php - 登録ミスの際の、国の初期表示を修正

Modified Paths:
--------------
    trunk/SmartUpload/user_form.php

Added Paths:
-----------
    trunk/SmartUpload/data/Opening.xml


-------------- next part --------------
Added: trunk/SmartUpload/data/Opening.xml
===================================================================
--- trunk/SmartUpload/data/Opening.xml	                        (rev 0)
+++ trunk/SmartUpload/data/Opening.xml	2011-05-28 14:28:14 UTC (rev 50)
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<AbsoluteLayout
+android:id="@+id/widget32"
+android:layout_width="fill_parent"
+android:layout_height="fill_parent"
+xmlns:android="http://schemas.android.com/apk/res/android"
+>
+<Button
+android:id="@+id/Start_Button"
+android:layout_width="wrap_content"
+android:layout_height="wrap_content"
+android:text="開始"
+android:layout_x="130px"
+android:layout_y="312px"
+>
+</Button>
+<ImageView
+android:id="@+id/widget40"
+android:layout_width="wrap_content"
+android:layout_height="wrap_content"
+android:src="C:\Documents and Settings\Admin\デスクトップ\Sangokushi\trunk\images\logo.gif"
+android:layout_x="140px"
+android:layout_y="102px"
+>
+</ImageView>
+</AbsoluteLayout>


Property changes on: trunk/SmartUpload/data/Opening.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Modified: trunk/SmartUpload/user_form.php
===================================================================
--- trunk/SmartUpload/user_form.php	2011-05-17 10:35:22 UTC (rev 49)
+++ trunk/SmartUpload/user_form.php	2011-05-28 14:28:14 UTC (rev 50)
@@ -2,7 +2,7 @@
 /*
  * SmartUpload/user_form.php
  * @author Hiroyuki Shibata
- * 2011/05/17
+ * 2011/05/28
  * Rev 1.0
  *
  */
@@ -41,16 +41,29 @@
 
 		if ($_POST) {
 
+		// 選択されたリスト項目
 			$stmt = $db->prepare("SELECT * FROM country where num = ?");
 			$stmt->execute(array($_POST['country']));
 
 			$row = $stmt->fetch(PDO::FETCH_ASSOC);
 	?>
-			<option value="<?php print($row["num"]); ?>">
+			<option value="<?php print($row["num"]); ?>" selected>
 				<?php print($row["country_name"]); ?>
 			</option>
 	<?php
+		// 選択されなかったリスト項目
 
+			$stmt2 = $db->prepare("SELECT * FROM country where not num = ? ORDER BY num");
+			$stmt2->execute(array($_POST['country']));
+
+			while ($row2 = $stmt2->fetch(PDO::FETCH_ASSOC)) {
+	?>
+				<option value="<?php print($row2["num"]); ?>">
+					<?php print($row2["country_name"]); ?>
+				</option>
+	<?php
+			}
+
 		} else {
 
 			$stmt = $db->prepare("SELECT * FROM country ORDER BY num");
@@ -58,15 +71,12 @@
 
 			while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
 	?>
-			<option value="<?php print($row["num"]); ?>">
-				<?php print($row["country_name"]); ?>
-			</option>
+				<option value="<?php print($row["num"]); ?>">
+					<?php print($row["country_name"]); ?>
+				</option>
 	<?php
-
 			}
-
 		}
-
 	?>
 		</select>
 
@@ -76,7 +86,6 @@
 		</pre>
 	</form>
 	<?php
-
 	}
 
 	$pdo = null;



Smartupload-svn メーリングリストの案内
Back to archive index