Changeset 1070
- Timestamp:
- 11/09/2007 09:10:15 PM (13 months ago)
- Location:
- branches/website/application
- Files:
-
- 5 modified
-
controllers/download.php (modified) (3 diffs)
-
libraries/MY_Controller.php (modified) (2 diffs)
-
views/media/css/layout.css (modified) (1 diff)
-
views/pages/download.php (modified) (4 diffs)
-
views/pages/tutorials/index.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/website/application/controllers/download.php
r1069 r1070 185 185 ); 186 186 187 if (empty($_ POST))188 { 189 // Fake POST data, for validation190 $ _POST= array187 if (empty($_GET)) 188 { 189 // Fake validation data, so that we can pre-fill the form 190 $validate = array 191 191 ( 192 192 'group' => 'standard', … … 197 197 ) 198 198 ); 199 200 // Do not validate fake POST data201 $validate = FALSE;202 199 } 203 200 else 204 201 { 205 $validate = TRUE; 202 // Validate GET data 203 $validate = $_GET; 206 204 } 207 205 208 206 // Load validation 209 $this->load->library('validation' );207 $this->load->library('validation', $validate); 210 208 211 209 // Set rules … … 217 215 )); 218 216 219 if ( $validateAND $this->validation->run())217 if ( ! empty($_GET) AND $this->validation->run()) 220 218 { 221 219 // Get current directory for return -
branches/website/application/libraries/MY_Controller.php
r1063 r1070 49 49 'tutorials' => 'Tutorials', 50 50 // External links 51 'http:// kohanaphp.com/forums/'=> 'Forums',52 'http:// kohanaphp.com/user_guide/' => 'User Guide'51 'http://forums.kohanaphp.com/' => 'Forums', 52 'http://api.kohanaphp.com/' => 'API Manual' 53 53 ); 54 54 … … 101 101 } 102 102 103 // Add the feed to the template104 $feeds[$name] = feed::parse($filename, 3);103 // Add the feed to the sidebar 104 // $this->template->sidebar->feeds[$name] = feed::parse($filename, 3); 105 105 } 106 107 $this->template->sidebar->feeds = $feeds;108 106 109 107 // Auto-rendering -
branches/website/application/views/media/css/layout.css
r1051 r1070 49 49 #body ul, #body ol { padding-left: 1.5em; margin-bottom: 1em; list-style: square; line-height: 180%; } 50 50 #body ol { list-style: decimal; } 51 #body form ul { padding-left: 0; list-style: none; } 51 #body form fieldset { padding: 0.5em 0; } 52 #body form .legend { display: block; padding: 0.5em; background: #ddefbd; } 53 #body form ul { display: block; padding: 0.5em 1em 0; list-style: none; } 52 54 #body .intro { margin: 1em; margin-left: -4em; padding: 1em 2em; padding-left: 4em; background: #eaeee5; font-size: 1.6em; line-height: 1.4em; color: #8C9393; } 53 55 #body .intro strong { text-transform: uppercase; font-weight: bold; font-size: 0.76em; color: #7b7d78; letter-spacing: -0.02em; white-space: nowrap; } -
branches/website/application/views/pages/download.php
r1063 r1070 4 4 5 5 6 <?php echo form::open('download') ?> 7 <p>Choose your download type:</p> 6 <?php echo form::open('download', array('method' => 'get')) ?> 8 7 8 <fieldset><span class="legend">Choose your download type:</span> 9 9 <ul> 10 <li><label><?php echo form::radio('group', 'minimal', ($this->validation->group == 'minimal')) ?> <strong> Tiny Flower (Minimal)</strong></label> – Included libraries: Session, Validation. Included helpers: array, cookie, form, html, security, url, and validation.</li>11 <li><label><?php echo form::radio('group', 'standard', ($this->validation->group == 'standard')) ?> <strong> Naked Babe (Standard)</strong></label> – Additional libraries: Archive, Database, Encryption, Pagination, and Profiler. Additional helpers: date, download, feed, inflector, and text.</li>10 <li><label><?php echo form::radio('group', 'minimal', ($this->validation->group == 'minimal')) ?> <strong>Minimal</strong></label> – Included libraries: Session, Validation. Included helpers: array, cookie, form, html, security, url, and validation.</li> 11 <li><label><?php echo form::radio('group', 'standard', ($this->validation->group == 'standard')) ?> <strong>Standard</strong></label> – Additional libraries: Archive, Database, Encryption, Pagination, and Profiler. Additional helpers: date, download, feed, inflector, and text.</li> 12 12 </ul> 13 </fieldset> 13 14 14 <p>Include the following vendor tools in my download:</p> 15 15 <fieldset><span class="legend">Include the following vendor tools in my download:</span> 16 16 <ul> 17 17 <?php … … 29 29 ?> 30 30 </ul> 31 </fieldset> 31 32 32 <p>Include the following languages in my download:</p> 33 <?php echo $this->validation->languages_error ?> 33 <fieldset><span class="legend">Include the following languages in my download:</span> 34 34 <ul> 35 35 <?php … … 45 45 ?> 46 46 </ul> 47 </fieldset> 47 48 48 < p>Choose your download format:</p>49 <fieldset><span class="legend">Choose your download format:</span> 49 50 <?php echo $this->validation->format_error ?> 50 51 <ul> … … 61 62 ?> 62 63 </ul> 64 </fieldset> 63 65 64 <?php echo form::button(array('type' => 'submit' , 'name' => 'download'), 'Download Kohana!') ?>66 <?php echo form::button(array('type' => 'submit'), 'Download Kohana!') ?> 65 67 <?php echo form::close() ?> -
branches/website/application/views/pages/tutorials/index.php
r1054 r1070 6 6 7 7 <ul> 8 <li><?php echo html::anchor('tutorials/xss', 'XSS Attack Filtering') ?></li> 8 9 <li><?php echo html::anchor('tutorials/page', 'Creating a Page Controller') ?></li> 9 <li><?php echo html::anchor('tutorials/xss', 'XSS Filtering') ?></li>10 10 </ul>
