質問編集履歴
4
セキュリティの関わる問題なので削除させていただきました。
    
        title	
    CHANGED
    
    | @@ -1,1 +1,1 @@ | |
| 1 | 
            -
             | 
| 1 | 
            +
            セキュリティの関わる問題なので削除させていただきました。
         | 
    
        body	
    CHANGED
    
    | @@ -1,200 +1,1 @@ | |
| 1 | 
            -
            やりたいこと
         | 
| 2 | 
            -
            conntorollerで処理したデータをlayoutで表示したい。
         | 
| 3 | 
            -
             | 
| 4 | 
            -
            取得したデータはこちらになります。
         | 
| 5 | 
            -
            controller側でのデータの取得はできています。
         | 
| 6 | 
            -
            ```ここに言語を入力
         | 
| 7 | 
            -
            app/controllers/entity_controller.php (line 120)
         | 
| 8 | 
            -
            default
         | 
| 9 | 
            -
            app/controllers/entity_controller.php (line 120)
         | 
| 10 | 
            -
            temp
         | 
| 11 | 
            -
            app/controllers/entity_controller.php (line 120)
         | 
| 12 | 
            -
            infra
         | 
| 13 | 
            -
            app/controllers/entity_controller.php (line 120)
         | 
| 14 | 
            -
            tpcds_text_10
         | 
| 15 | 
            -
            app/controllers/entity_controller.php (line 120)
         | 
| 16 | 
            -
            tpcds_bin_partitioned_orc_10
         | 
| 17 | 
            -
            app/controllers/entity_controller.php (line 120)
         | 
| 18 | 
            -
            tpcds_text_100
         | 
| 19 | 
            -
            app/controllers/entity_controller.php (line 120)
         | 
| 20 | 
            -
            tpcds_bin_partitioned_orc_100
         | 
| 21 | 
            -
            app/controllers/entity_controller.php (line 120)
         | 
| 22 | 
            -
            tpcds_text_1000
         | 
| 23 | 
            -
            app/controllers/entity_controller.php (line 120)
         | 
| 24 | 
            -
             | 
| 25 | 
            -
            ```
         | 
| 26 | 
            -
             | 
| 27 | 
            -
            ```ここに言語を入力
         | 
| 28 | 
            -
            <html>
         | 
| 29 | 
            -
            <head>
         | 
| 30 | 
            -
            <title>hive configuration</title>
         | 
| 31 | 
            -
            <link href="/WebHive/css/main.css" rel="stylesheet">
         | 
| 32 | 
            -
            </head>
         | 
| 33 | 
            -
             | 
| 34 | 
            -
            <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" >
         | 
| 35 | 
            -
            <a name='page_top'></a>
         | 
| 36 | 
            -
             | 
| 37 | 
            -
            <?php echo $this->element('banner'); ?>
         | 
| 38 | 
            -
             | 
| 39 | 
            -
            <table width="100%" height="100%" cellspacing="0" cellpadding="0">
         | 
| 40 | 
            -
            	<tr height="5" bgcolor="#dfe9f6" class="noprint">
         | 
| 41 | 
            -
            		<td colspan="2">
         | 
| 42 | 
            -
            			<table width="100%">
         | 
| 43 | 
            -
            				<tr>
         | 
| 44 | 
            -
            <td align="left">
         | 
| 45 | 
            -
            <?php echo APP_TITLE ?><?php echo $app_title_msg; ?>
         | 
| 46 | 
            -
            </td>
         | 
| 47 | 
            -
            					<td align="right">
         | 
| 48 | 
            -
            <?php echo $user['User']['username']."さん"; ?>  
         | 
| 49 | 
            -
            |<a href='/WebHive/users/logout'>LOGOUT</a>
         | 
| 50 | 
            -
            |<a href='/WebHive/'>WebHive</a>
         | 
| 51 | 
            -
            |<a href="/WebHive/help" onclick="window.open('/WebHive/help','_blank','width=900,height=500,scrollbars=yes'); return false;">変更履歴</a>|
         | 
| 52 | 
            -
            					</td>
         | 
| 53 | 
            -
            				</tr>
         | 
| 54 | 
            -
            			</table>
         | 
| 55 | 
            -
            		</td>
         | 
| 56 | 
            -
            	</tr>
         | 
| 57 | 
            -
            	<tr class="noprint">
         | 
| 58 | 
            -
            		<td bgcolor="#efefef" colspan="1" height="8" style="background-image: url(/WebHive/img/shadow_gray.gif); background-repeat: repeat-x; border-right: #aaaaaa 1px solid;">
         | 
| 59 | 
            -
            			<img src="/WebHive/img/transparent_line.gif" width="200" height="2" border="0"><br>
         | 
| 60 | 
            -
            		</td>
         | 
| 61 | 
            -
            		<td bgcolor="#ffffff" colspan="1" height="8" style="background-image: url(/WebHive/img/shadow.gif); background-repeat: repeat-x;">
         | 
| 62 | 
            -
            		</td>
         | 
| 63 | 
            -
            	</tr>
         | 
| 64 | 
            -
             | 
| 65 | 
            -
             | 
| 66 | 
            -
            	<tr>
         | 
| 67 | 
            -
            	<td valign="top" style="padding: 5px; border-right: #aaaaaa 1px solid;">
         | 
| 68 | 
            -
            	<script type="text/javascript">
         | 
| 69 | 
            -
            	<!--
         | 
| 70 | 
            -
            	function applyGraphPreviewFilterChange(objForm) {
         | 
| 71 | 
            -
            		strURL = '?action=preview';
         | 
| 72 | 
            -
            		strURL = strURL + '&database_id=' + objForm.database_id.value;
         | 
| 73 | 
            -
            		strURL = strURL + '&table_id=' + objForm.table_id.value;
         | 
| 74 | 
            -
            		strURL = strURL + '&filter=' + objForm.filter.value;
         | 
| 75 | 
            -
            		document.location = strURL;
         | 
| 76 | 
            -
            	}
         | 
| 77 | 
            -
            	-->
         | 
| 78 | 
            -
            	</script>
         | 
| 79 | 
            -
            	<table width='100%' style='background-color: #f5f5f5; border: 1px solid #bbbbbb;' align='center' cellpadding='3'>
         | 
| 80 | 
            -
            	<tr bgcolor="E5E5E5" class="noprint">
         | 
| 81 | 
            -
            		<form name="form_graph_view" method="post">
         | 
| 82 | 
            -
            		<td class="noprint">
         | 
| 83 | 
            -
            			<table width="100%" cellpadding="0" cellspacing="0">
         | 
| 84 | 
            -
             | 
| 85 | 
            -
            				<tr class="noprint">
         | 
| 86 | 
            -
            					<td nowrap style='white-space: nowrap;' width="40">
         | 
| 87 | 
            -
            						 <strong>Database:</strong> 
         | 
| 88 | 
            -
            					</td>
         | 
| 89 | 
            -
            					<td width="1">
         | 
| 90 | 
            -
            						<select name="database_id" onChange="applyGraphPreviewFilterChange(document.form_graph_view)">
         | 
| 91 | 
            -
            <?php
         | 
| 92 | 
            -
            	foreach($dbs as $name){
         | 
| 93 | 
            -
            		$p_database=$name['DBS']['NAME'];
         | 
| 94 | 
            -
            		$para['database']=$p_database;
         | 
| 95 | 
            -
            		debug($para['database']);
         | 
| 96 | 
            -
            		}
         | 
| 97 | 
            -
            		print($para['database']);
         | 
| 98 | 
            -
            ?>
         | 
| 99 | 
            -
            						</select>
         | 
| 100 | 
            -
            					</td>
         | 
| 101 | 
            -
            					<td nowrap style='white-space: nowrap;' width="40">
         | 
| 102 | 
            -
            						 <strong>Table:</strong> 
         | 
| 103 | 
            -
            					</td>
         | 
| 104 | 
            -
            					<td width="1">
         | 
| 105 | 
            -
            						<select name="table_id" onChange="applyGraphPreviewFilterChange(document.form_graph_view)">
         | 
| 106 | 
            -
            <?php print($para['table']); ?>
         | 
| 107 | 
            -
            						</select>
         | 
| 108 | 
            -
            					</td>
         | 
| 109 | 
            -
             | 
| 110 | 
            -
            					<td nowrap style='white-space: nowrap;' width="50">
         | 
| 111 | 
            -
            						  <strong> Filter:</strong> 
         | 
| 112 | 
            -
            					</td>
         | 
| 113 | 
            -
            					<td width="1">
         | 
| 114 | 
            -
            						<input type="text" name="filter" size="40" value="<?php print($para['filter']); ?>">
         | 
| 115 | 
            -
            					</td>
         | 
| 116 | 
            -
             | 
| 117 | 
            -
            					<td style='white-space:nowrap;' nowrap>
         | 
| 118 | 
            -
            						 <input type="image" src="/WebHive/img/button_go.gif" alt="Go" border="0" align="absmiddle">
         | 
| 119 | 
            -
            						<input type="image" src="/WebHive/img/button_clear.gif" name="clear" alt="Clear" border="0" align="absmiddle">
         | 
| 120 | 
            -
            					</td>
         | 
| 121 | 
            -
            					<td nowrap style='white-space: nowrap;' width="10">
         | 
| 122 | 
            -
            						<a href="/WebHive/entity/download?database_id=<?php print($para['database_id']); ?>">DOWNLOAD</a>
         | 
| 123 | 
            -
            					</td>
         | 
| 124 | 
            -
            				</tr>
         | 
| 125 | 
            -
            			</table>
         | 
| 126 | 
            -
            		</td>
         | 
| 127 | 
            -
            		</form>
         | 
| 128 | 
            -
            	</tr>
         | 
| 129 | 
            -
             | 
| 130 | 
            -
            	</table><table width='100%' style='background-color: #f5f5f5; border: 1px solid #bbbbbb;' align='center' cellpadding='3'>
         | 
| 131 | 
            -
            		</table><br>
         | 
| 132 | 
            -
            <table width='100%' style='background-color: #f5f5f5; border: 1px solid #bbbbbb;' align='center' cellpadding='1'>
         | 
| 133 | 
            -
            	<tr bgcolor='#17385b' class='noprint'>
         | 
| 134 | 
            -
            		<td colspan='2'>
         | 
| 135 | 
            -
            			<table width='100%' cellspacing='0' cellpadding='3' border='0'>
         | 
| 136 | 
            -
            				<tr>
         | 
| 137 | 
            -
            					<td align='left' class='textHeaderDark' width='15%'>
         | 
| 138 | 
            -
            <?php print($para['previous']); ?>
         | 
| 139 | 
            -
            											</td>
         | 
| 140 | 
            -
            					<td align='center' class='textHeaderDark' width='70%'>
         | 
| 141 | 
            -
            <?php print($para['rows']); ?>
         | 
| 142 | 
            -
            											</td>
         | 
| 143 | 
            -
            					<td align='right' class='textHeaderDark' width='15%'>
         | 
| 144 | 
            -
            <?php print($para['next']); ?>
         | 
| 145 | 
            -
            											</td>
         | 
| 146 | 
            -
            				</tr>
         | 
| 147 | 
            -
            			</table>
         | 
| 148 | 
            -
            		</td>
         | 
| 149 | 
            -
            	</tr>
         | 
| 150 | 
            -
             | 
| 151 | 
            -
            	<tr style='background-color: #F2F2F2;'>
         | 
| 152 | 
            -
            		<td align='center' width='100%'>
         | 
| 153 | 
            -
            				<table align='center' cellpadding='0' width='100%'>
         | 
| 154 | 
            -
            					<tr>
         | 
| 155 | 
            -
            						<td align='center'>
         | 
| 156 | 
            -
            <?php print($para['data']); ?>
         | 
| 157 | 
            -
            						</td>
         | 
| 158 | 
            -
            					</tr>
         | 
| 159 | 
            -
            				</table>
         | 
| 160 | 
            -
            			</td>
         | 
| 161 | 
            -
            			<td align='center' width='50%'>
         | 
| 162 | 
            -
            		</td>
         | 
| 163 | 
            -
            	</tr>
         | 
| 164 | 
            -
             | 
| 165 | 
            -
            	<tr bgcolor='#17385b' class='noprint'>
         | 
| 166 | 
            -
            		<td colspan='2'>
         | 
| 167 | 
            -
            			<table width='100%' cellspacing='0' cellpadding='3' border='0'>
         | 
| 168 | 
            -
            				<tr>
         | 
| 169 | 
            -
            					<td align='left' class='textHeaderDark' width='15%'>
         | 
| 170 | 
            -
            <?php print($para['previous']); ?>
         | 
| 171 | 
            -
            											</td>
         | 
| 172 | 
            -
            					<td align='center' class='textHeaderDark' width='70%'>
         | 
| 173 | 
            -
            <?php print($para['rows']); ?>
         | 
| 174 | 
            -
            											</td>
         | 
| 175 | 
            -
            					<td align='right' class='textHeaderDark' width='15%'>
         | 
| 176 | 
            -
            <?php print($para['next']); ?>
         | 
| 177 | 
            -
            											</td>
         | 
| 178 | 
            -
            				</tr>
         | 
| 179 | 
            -
            			</table>
         | 
| 180 | 
            -
            		</td>
         | 
| 181 | 
            -
            	</tr>
         | 
| 182 | 
            -
            	</table>			<br>
         | 
| 183 | 
            -
            		</td>
         | 
| 184 | 
            -
            	</tr>
         | 
| 185 | 
            -
            </table>
         | 
| 186 | 
            -
             | 
| 187 | 
            -
            </body>
         | 
| 188 | 
            -
            </html>
         | 
| 189 | 
            -
            ```
         | 
| 190 | 
            -
             | 
| 1 | 
            +
            セキュリティの関わる問題なので削除させていただきました。
         | 
| 191 | 
            -
            ```ここに言語を入力
         | 
| 192 | 
            -
            <?php
         | 
| 193 | 
            -
            	foreach($dbs as $name){
         | 
| 194 | 
            -
            		$p_database=$name['DBS']['NAME'];
         | 
| 195 | 
            -
            		$para['database']=$p_database;
         | 
| 196 | 
            -
            		debug($para['database']);
         | 
| 197 | 
            -
            		}
         | 
| 198 | 
            -
            		print($para['database']);
         | 
| 199 | 
            -
            ?>
         | 
| 200 | 
            -
            ```
         | 
3
修正
    
        title	
    CHANGED
    
    | @@ -1,1 +1,1 @@ | |
| 1 | 
            -
            cakephp conntrollerで渡したデータがlayoutで表示されない
         | 
| 1 | 
            +
            cakephp conntrollerで渡したデータがlayoutでprintで表示されない
         | 
    
        body	
    CHANGED
    
    | @@ -188,7 +188,6 @@ | |
| 188 188 | 
             
            </html>
         | 
| 189 189 | 
             
            ```
         | 
| 190 190 | 
             
            下記の部分でのデータの表示ができていません。
         | 
| 191 | 
            -
            this->setで渡しているのですがうまくデータが渡せていないんでしょうか?
         | 
| 192 191 | 
             
            ```ここに言語を入力
         | 
| 193 192 | 
             
            <?php
         | 
| 194 193 | 
             
            	foreach($dbs as $name){
         | 
2
修正
    
        title	
    CHANGED
    
    | @@ -1,1 +1,1 @@ | |
| 1 | 
            -
            cakephp layoutで表示されない
         | 
| 1 | 
            +
            cakephp conntrollerで渡したデータがlayoutで表示されない
         | 
    
        body	
    CHANGED
    
    | @@ -1,12 +1,8 @@ | |
| 1 1 | 
             
            やりたいこと
         | 
| 2 2 | 
             
            conntorollerで処理したデータをlayoutで表示したい。
         | 
| 3 | 
            -
             | 
| 3 | 
            +
             | 
| 4 | 
            -
            <select name="database_id" onChange="applyGraphPreviewFilterChange(document.form_graph_view)">
         | 
| 5 | 
            -
            <?php print($para['database']); ?>
         | 
| 6 | 
            -
            ```
         | 
| 7 | 
            -
            の部分が表示されませんなぜでしょうか?
         | 
| 8 4 | 
             
            取得したデータはこちらになります。
         | 
| 9 | 
            -
            データの取得はできています。
         | 
| 5 | 
            +
            controller側でのデータの取得はできています。
         | 
| 10 6 | 
             
            ```ここに言語を入力
         | 
| 11 7 | 
             
            app/controllers/entity_controller.php (line 120)
         | 
| 12 8 | 
             
            default
         | 
| @@ -29,35 +25,6 @@ | |
| 29 25 | 
             
            ```
         | 
| 30 26 |  | 
| 31 27 | 
             
            ```ここに言語を入力
         | 
| 32 | 
            -
            <?php
         | 
| 33 | 
            -
            class EntityController extends AppController {
         | 
| 34 | 
            -
            	var $name = 'Entity';
         | 
| 35 | 
            -
            	var $components = array('RequestHandler','Auth','Common');
         | 
| 36 | 
            -
            	var $user;
         | 
| 37 | 
            -
             | 
| 38 | 
            -
            	function index() {
         | 
| 39 | 
            -
             | 
| 40 | 
            -
            		$this->Entity->setDataSource('hive');
         | 
| 41 | 
            -
            	
         | 
| 42 | 
            -
            		//変数初期化
         | 
| 43 | 
            -
            		$this->layout='entity';
         | 
| 44 | 
            -
            		$p_database="";
         | 
| 45 | 
            -
             | 
| 46 | 
            -
            		//データベース一覧
         | 
| 47 | 
            -
            		$sql ="select * from DBS;";
         | 
| 48 | 
            -
            		$para= $this->Entity->query($sql);
         | 
| 49 | 
            -
            		debug($para);
         | 
| 50 | 
            -
            		foreach($para as $name){
         | 
| 51 | 
            -
            			$p_database=$name['DBS']['NAME']
         | 
| 52 | 
            -
                        $para['database']=$p_database;
         | 
| 53 | 
            -
                        debug($para['database']);
         | 
| 54 | 
            -
            		}
         | 
| 55 | 
            -
            		
         | 
| 56 | 
            -
            		$this->set('para', $para);
         | 
| 57 | 
            -
             | 
| 58 | 
            -
            	}
         | 
| 59 | 
            -
            ```
         | 
| 60 | 
            -
            ```ここに言語を入力
         | 
| 61 28 | 
             
            <html>
         | 
| 62 29 | 
             
            <head>
         | 
| 63 30 | 
             
            <title>hive configuration</title>
         | 
| @@ -121,7 +88,14 @@ | |
| 121 88 | 
             
            					</td>
         | 
| 122 89 | 
             
            					<td width="1">
         | 
| 123 90 | 
             
            						<select name="database_id" onChange="applyGraphPreviewFilterChange(document.form_graph_view)">
         | 
| 91 | 
            +
            <?php
         | 
| 92 | 
            +
            	foreach($dbs as $name){
         | 
| 93 | 
            +
            		$p_database=$name['DBS']['NAME'];
         | 
| 94 | 
            +
            		$para['database']=$p_database;
         | 
| 95 | 
            +
            		debug($para['database']);
         | 
| 96 | 
            +
            		}
         | 
| 124 | 
            -
             | 
| 97 | 
            +
            		print($para['database']);
         | 
| 98 | 
            +
            ?>
         | 
| 125 99 | 
             
            						</select>
         | 
| 126 100 | 
             
            					</td>
         | 
| 127 101 | 
             
            					<td nowrap style='white-space: nowrap;' width="40">
         | 
| @@ -212,4 +186,16 @@ | |
| 212 186 |  | 
| 213 187 | 
             
            </body>
         | 
| 214 188 | 
             
            </html>
         | 
| 189 | 
            +
            ```
         | 
| 190 | 
            +
            下記の部分でのデータの表示ができていません。
         | 
| 191 | 
            +
            this->setで渡しているのですがうまくデータが渡せていないんでしょうか?
         | 
| 192 | 
            +
            ```ここに言語を入力
         | 
| 193 | 
            +
            <?php
         | 
| 194 | 
            +
            	foreach($dbs as $name){
         | 
| 195 | 
            +
            		$p_database=$name['DBS']['NAME'];
         | 
| 196 | 
            +
            		$para['database']=$p_database;
         | 
| 197 | 
            +
            		debug($para['database']);
         | 
| 198 | 
            +
            		}
         | 
| 199 | 
            +
            		print($para['database']);
         | 
| 200 | 
            +
            ?>
         | 
| 215 201 | 
             
            ```
         | 
1
修正
    
        title	
    CHANGED
    
    | 
            File without changes
         | 
    
        body	
    CHANGED
    
    | @@ -6,23 +6,26 @@ | |
| 6 6 | 
             
            ```
         | 
| 7 7 | 
             
            の部分が表示されませんなぜでしょうか?
         | 
| 8 8 | 
             
            取得したデータはこちらになります。
         | 
| 9 | 
            +
            データの取得はできています。
         | 
| 9 10 | 
             
            ```ここに言語を入力
         | 
| 11 | 
            +
            app/controllers/entity_controller.php (line 120)
         | 
| 12 | 
            +
            default
         | 
| 13 | 
            +
            app/controllers/entity_controller.php (line 120)
         | 
| 14 | 
            +
            temp
         | 
| 15 | 
            +
            app/controllers/entity_controller.php (line 120)
         | 
| 10 | 
            -
             | 
| 16 | 
            +
            infra
         | 
| 11 | 
            -
            (
         | 
| 12 | 
            -
                [0] => Array
         | 
| 13 | 
            -
                    (
         | 
| 14 | 
            -
                        [DBS] => Array
         | 
| 15 | 
            -
                            (
         | 
| 16 | 
            -
                                [DB_ID] => 1
         | 
| 17 | 
            -
                                [DESC] => Default Hive database
         | 
| 18 | 
            -
             | 
| 17 | 
            +
            app/controllers/entity_controller.php (line 120)
         | 
| 18 | 
            +
            tpcds_text_10
         | 
| 19 | 
            +
            app/controllers/entity_controller.php (line 120)
         | 
| 19 | 
            -
             | 
| 20 | 
            +
            tpcds_bin_partitioned_orc_10
         | 
| 21 | 
            +
            app/controllers/entity_controller.php (line 120)
         | 
| 22 | 
            +
            tpcds_text_100
         | 
| 23 | 
            +
            app/controllers/entity_controller.php (line 120)
         | 
| 24 | 
            +
            tpcds_bin_partitioned_orc_100
         | 
| 25 | 
            +
            app/controllers/entity_controller.php (line 120)
         | 
| 20 | 
            -
             | 
| 26 | 
            +
            tpcds_text_1000
         | 
| 21 | 
            -
             | 
| 27 | 
            +
            app/controllers/entity_controller.php (line 120)
         | 
| 22 | 
            -
                            )
         | 
| 23 28 |  | 
| 24 | 
            -
                    )
         | 
| 25 | 
            -
            )
         | 
| 26 29 | 
             
            ```
         | 
| 27 30 |  | 
| 28 31 | 
             
            ```ここに言語を入力
         | 
| @@ -45,9 +48,11 @@ | |
| 45 48 | 
             
            		$para= $this->Entity->query($sql);
         | 
| 46 49 | 
             
            		debug($para);
         | 
| 47 50 | 
             
            		foreach($para as $name){
         | 
| 48 | 
            -
            			$p_database=$name['DBS'][' | 
| 51 | 
            +
            			$p_database=$name['DBS']['NAME']
         | 
| 52 | 
            +
                        $para['database']=$p_database;
         | 
| 53 | 
            +
                        debug($para['database']);
         | 
| 49 54 | 
             
            		}
         | 
| 50 | 
            -
            		 | 
| 55 | 
            +
            		
         | 
| 51 56 | 
             
            		$this->set('para', $para);
         | 
| 52 57 |  | 
| 53 58 | 
             
            	}
         | 
