Changeset 117

Show
Ignore:
Timestamp:
01/18/06 18:45:19 (6 years ago)
Author:
john
Message:

Made all the file php long tags (uglysvn up)

Location:
trunk
Files:
44 modified

Legend:

Unmodified
Added
Removed
  • trunk/public/dispatch.php

    r1 r117  
    1 <? 
     1<?php 
    22 
    33require_once("environment.php"); 
  • trunk/trax/app/application_mailer.php

    r1 r117  
    1 <? 
     1<?php 
    22# The filters added to this controller will be run for all controllers in the application. 
    33# Likewise will all the methods added be available for all controllers. 
  • trunk/trax/app/controllers/application.php

    r1 r117  
    1 <? 
     1<?php 
    22# The filters added to this controller will be run for all controllers in the application. 
    33# Likewise will all the methods added be available for all controllers. 
  • trunk/trax/app/helpers/application_helper.php

    r1 r117  
    1 <? 
     1<?php 
    22# Anything added to this helper will be available to all templates in the application. 
    33 
  • trunk/trax/config/environments/development.php

    r1 r117  
    1 <? 
     1<?php 
    22// put all the global 'development' settings for this application in this file 
    33 
  • trunk/trax/config/environments/production.php

    r1 r117  
    1 <? 
     1<?php 
    22// put all the global 'production' settings for this application in this file 
    33 
  • trunk/trax/config/environments/test.php

    r1 r117  
    1 <? 
     1<?php 
    22// put all the global 'test' settings for this application in this file 
    33 
  • trunk/trax/config/routes.php

    r4 r117  
    1 <?                        
     1<?php                        
    22# Add your own custom routes here. 
    33# The priority is based upon order of creation: first created -> highest priority. 
  • trunk/trax/script/generate.php

    r76 r117  
    11#! /usr/local/bin/php 
    2 <? 
     2<?php 
    33# $Id$ 
    44# 
  • trunk/trax/vendor/trax/action_controller.php

    r113 r117  
    1 <? 
     1<?php 
    22# $Id$ 
    33# 
     
    187187                    $GLOBALS['current_controller_path'] = "$this->added_path/$this->controller"; 
    188188                    $GLOBALS['current_controller_name'] = $this->controller; 
    189                     $GLOBALS['current_controller_object'] = $this->controller_object; 
     189                    $GLOBALS['current_controller_object'] =& $this->controller_object; 
    190190                } 
    191191 
     
    198198                    if(file_exists(TRAX_LIB_ROOT."/scaffold_controller.php")) { 
    199199                        include_once(TRAX_LIB_ROOT."/scaffold_controller.php"); 
    200                         $GLOBALS['current_controller_object'] = $this->controller_object = new ScaffoldController($scaffold); 
     200                        $this->controller_object = new ScaffoldController($scaffold); 
     201                        $GLOBALS['current_controller_object'] =& $this->controller_object; 
    201202                        if($this->action) { 
    202203                            $this->view_file = TRAX_LIB_ROOT . "/templates/scaffolds/".$this->action.".phtml"; 
     
    350351    function add_before_filter($filter_function_name) { 
    351352        if(is_string($filter_function_name) && !empty($filter_function_name)) { 
    352             $this->before_filters[] = $filter_function_name; 
     353            if(!in_array($filter_function_name, $this->before_filters)) { 
     354                $this->before_filters[] = $filter_function_name; 
     355            }                         
    353356        } elseif(is_array($filter_function_name)) { 
    354357            if(count($this->before_filters) > 0) { 
     
    372375    function add_after_filter($filter_function_name) { 
    373376        if(is_string($filter_function_name) && !empty($filter_function_name)) { 
    374             $this->after_filters[] = $filter_function_name; 
     377            if(!in_array($filter_function_name, $this->after_filters)) { 
     378                $this->after_filters[] = $filter_function_name; 
     379            } 
    375380        } elseif(is_array($filter_function_name)) { 
    376381            if(count($this->after_filters) > 0) { 
     
    383388 
    384389    function add_helper($helper_name) { 
    385         $this->helpers[] = $helper_name; 
    386     } 
    387  
    388     function render_partial($path) { 
     390        if(!in_array($helper_name, $this->helpers)) { 
     391            $this->helpers[] = $helper_name; 
     392        } 
     393    } 
     394 
     395    function render_partial($path, $options = array()) { 
    389396        if(strstr($path, "/")) { 
    390397            $file = substr(strrchr($path, "/"), 1); 
    391398            $path = substr($path, 0, strripos($path, "/")); 
    392             $path_with_file = TRAX_ROOT.$GLOBALS['TRAX_INCLUDES']['views']."/".$path."/_".$file.".".$this->views_file_extention; 
     399            $file_with_path = TRAX_ROOT.$GLOBALS['TRAX_INCLUDES']['views']."/".$path."/_".$file.".".$this->views_file_extention; 
    393400        } else { 
    394             $path_with_file = $this->views_path."/_".$path.".".$this->views_file_extention; 
    395         } 
    396  
    397         if(file_exists($path_with_file)) { 
     401            $file = $path; 
     402            $file_with_path = $this->views_path."/_".$file.".".$this->views_file_extention; 
     403        } 
     404 
     405        if(file_exists($file_with_path)) { 
     406             
     407            if(array_key_exists("spacer_template", $options)) { 
     408                $spacer_path = $options['spacer_template']; 
     409                if(strstr($spacer_path, "/")) { 
     410                    $spacer_file = substr(strrchr($spacer_path, "/"), 1); 
     411                    $spacer_path = substr($spacer_path, 0, strripos($spacer_path, "/")); 
     412                    $spacer_file_with_file = TRAX_ROOT.$GLOBALS['TRAX_INCLUDES']['views']."/".$spacer_path."/_".$spacer_file.".".$this->views_file_extention; 
     413                } else { 
     414                    $spacer_file = $spacer_path; 
     415                    $spacer_file_with_file = $this->views_path."/_".$spacer_file.".".$this->views_file_extention; 
     416                }   
     417                if(file_exists($spacer_file_with_file)) { 
     418                    $add_spacer = true;     
     419                } 
     420            }           
     421             
    398422            # Pull all the class vars out and turn them from $this->var to $var 
    399423            extract(get_object_vars($this->controller_object)); 
    400             include($path_with_file); 
     424            if(array_key_exists("collection", $options)) { 
     425                foreach($options['collection'] as $tmp_value) { 
     426                    ${$file."_counter"}++; 
     427                    ${$file} = $tmp_value; 
     428                    unset($tmp_value); 
     429                    include($file_with_path);     
     430                    if($add_spacer && (${$file."_counter"} < count($options['collection']))) { 
     431                        include($spacer_file_with_file);         
     432                    }          
     433                }     
     434            } else { 
     435                if(array_key_exists("locals", $options)) { 
     436                    foreach($options['locals'] as $tmp_key => $tmp_value) { 
     437                        ${$tmp_key} = $tmp_value;                 
     438                    }     
     439                    unset($tmp_key); 
     440                    unset($tmp_value); 
     441                } 
     442                include($path_with_file);         
     443            }            
    401444        } 
    402445    } 
  • trunk/trax/vendor/trax/action_mailer.php

    r83 r117  
    1 <? 
     1<?php 
    22# $Id$ 
    33# 
  • trunk/trax/vendor/trax/action_view.php

    r116 r117  
    1 <? 
     1<?php 
    22# $Id$ 
    33# 
     
    3131include_once(TRAX_LIB_ROOT . "/action_view/helpers/form_options_helper.php"); 
    3232include_once(TRAX_LIB_ROOT . "/action_view/helpers/date_helper.php"); 
    33 #include_once(TRAX_LIB_ROOT . "/action_view/helpers/text_helper.php"); 
    3433include_once(TRAX_LIB_ROOT . "/action_view/helpers/active_record_helper.php"); 
    3534 
  • trunk/trax/vendor/trax/action_view/helpers.php

    r116 r117  
    1 <? 
    2  
     1<?php 
    32# $Id$ 
    43# 
     
    117116} 
    118117 
     118 
     119################################################################################################ 
     120## Avialble functions for use in views 
     121################################################################################################ 
    119122function content_tag() { 
    120123    $helper = new Helpers(); 
     
    123126} 
    124127 
     128function url_for($options = array()) { 
     129    $helper = new Helpers(); 
     130    return $helper->url_for($options); 
     131} 
     132 
    125133?> 
  • trunk/trax/vendor/trax/action_view/helpers/active_record_helper.php

    r113 r117  
    11<?php 
    2  
     2# $Id$ 
     3# 
     4# Copyright (c) 2005 John Peterson 
     5# 
     6# Permission is hereby granted, free of charge, to any person obtaining 
     7# a copy of this software and associated documentation files (the 
     8# "Software"), to deal in the Software without restriction, including 
     9# without limitation the rights to use, copy, modify, merge, publish, 
     10# distribute, sublicense, and/or sell copies of the Software, and to 
     11# permit persons to whom the Software is furnished to do so, subject to 
     12# the following conditions: 
     13# 
     14# The above copyright notice and this permission notice shall be 
     15# included in all copies or substantial portions of the Software. 
     16# 
     17# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 
     18# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 
     19# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 
     20# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 
     21# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 
     22# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 
     23# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 
    324 
    425class ActiveRecordHelper extends Helpers { 
  • trunk/trax/vendor/trax/action_view/helpers/date_helper.php

    r113 r117  
    1 <? 
    2  
     1<?php 
    32# $Id$ 
    43# 
  • trunk/trax/vendor/trax/action_view/helpers/form_helper.php

    r113 r117  
    1 <? 
    2  
     1<?php 
    32# $Id$ 
    43# 
  • trunk/trax/vendor/trax/action_view/helpers/form_options_helper.php

    r116 r117  
    1 <? 
    2  
     1<?php 
    32# $Id$ 
    43# 
  • trunk/trax/vendor/trax/action_view/helpers/form_tag_helper.php

    r106 r117  
    1 <? 
    2  
     1<?php 
    32# $Id$ 
    43# 
  • trunk/trax/vendor/trax/action_view/helpers/url_helper.php

    r107 r117  
    1 <? 
    2  
     1<?php 
    32# $Id$ 
    43# 
     
    140139} 
    141140 
    142 function url_for($options = array()) { 
    143     $url_helper = new UrlHelper(); 
    144     return $url_helper->url_for($options); 
    145 } 
    146  
    147141?> 
  • trunk/trax/vendor/trax/active_record.php

    r112 r117  
    1 <? 
     1<?php 
    22# $Id$ 
    33# 
  • trunk/trax/vendor/trax/dispatcher.php

    r107 r117  
    1 <? 
     1<?php 
    22# $Id$ 
    33# 
  • trunk/trax/vendor/trax/inflector.php

    r72 r117  
    1 <? 
    2 # $Id: inflector.php 55 2005-11-11 22:38:37Z john $ 
     1<?php 
     2# $Id$ 
    33# 
    44# Copyright (c) 2005 John Peterson 
  • trunk/trax/vendor/trax/input_filter.php

    r107 r117  
    1212  */ 
    1313class InputFilter { 
     14     
    1415    static protected $tagsArray = array();  // default = empty array 
    1516    static protected $attrArray = array();  // default = empty array 
  • trunk/trax/vendor/trax/router.php

    r72 r117  
    1 <? 
    2 # $Id: router.php 51 2005-10-29 14:40:42Z john $ 
     1<?php 
     2# $Id$ 
    33# 
    44# Copyright (c) 2005 John Peterson 
  • trunk/trax/vendor/trax/scaffold_controller.php

    r113 r117  
    1 <? 
     1<?php 
    22# $Id $ 
    33# 
  • trunk/trax/vendor/trax/session.php

    r101 r117  
    11<?php 
    2  
    32# $Id$ 
    43# 
     
    8382 
    8483    function start() { 
     84         
     85        $session_name = defined("TRAX_SESSION_NAME") ? TRAX_SESSION_NAME : self::TRAX_SESSION_NAME; 
     86        $session_lifetime = defined("TRAX_SESSION_LIFETIME") ? TRAX_SESSION_LIFETIME : self::TRAX_SESSION_LIFETIME; 
     87        $session_maxlifetime_minutes = defined("TRAX_SESSION_MAXLIFETIME_MINUTES") ? TRAX_SESSION_MAXLIFETIME_MINUTES : self::TRAX_SESSION_MAXLIFETIME_MINUTES; 
     88         
    8589        # set the session default for this app 
    86         ini_set('session.name', TRAX_SESSION_NAME); 
    87         ini_set('session.cookie_lifetime', TRAX_SESSION_LIFETIME); 
     90        ini_set('session.name', $session_name); 
     91        ini_set('session.cookie_lifetime', $session_lifetime); 
    8892        ini_set('session.gc_probability', 1); 
    89         ini_set('session.gc_maxlifetime', TRAX_SESSION_MAXLIFETIME_MINUTES * 60); 
     93        ini_set('session.gc_maxlifetime', $session_maxlifetime_minutes * 60); 
    9094 
    9195        header('P3P: CP="NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM"'); 
  • trunk/trax/vendor/trax/templates/controller.php

    r72 r117  
    1 <? 
     1<?php 
    22 
    33class [class_name]Controller extends ApplicationController { 
  • trunk/trax/vendor/trax/templates/error.phtml

    r72 r117  
    11<html> 
    22<head> 
    3   <title><?=$error_heading?></title> 
     3  <title><?php echo $error_heading ?></title> 
    44  <style> 
    55    body { background-color: #fff; color: #333; } 
     
    4040<body> 
    4141 
    42 <h1><?=$error_heading?></h1> 
     42<h1><?php echo $error_heading ?></h1> 
    4343 
    44 <p><pre><?=$error_message?></pre></p> 
     44<p><pre><?php echo $error_message ?></pre></p> 
    4545 
    46 <? if($trace): ?> 
     46<?php if($trace): ?> 
    4747<a href="#" onclick="expandContract('framework_trace')">Show framework trace</a> 
    48 <pre id="framework_trace" style="display:none"><code><?=$trace?></code></pre> 
    49 <? endif; ?> 
     48<pre id="framework_trace" style="display:none"><code><?php echo $trace ?></code></pre> 
     49<?php endif; ?> 
    5050 
    5151<p><a href="#" onclick="expandContract('session_dump')">Show $_SESSION dump</a></p> 
    5252<div id="session_dump" style="display:none"><pre class='debug_dump'> 
    53 <?= print_r($_SESSION, true)?> 
     53<?php echo print_r($_SESSION, true) ?> 
    5454</pre></div> 
    5555 
    5656<p><a href="#" onclick="expandContract('get_dump')">Show $_GET dump</a></p> 
    5757<div id="get_dump" style="display:none"><pre class='debug_dump'> 
    58 <?= print_r($_GET, true)?> 
     58<?php echo print_r($_GET, true) ?> 
    5959</pre></div> 
    6060 
    6161<p><a href="#" onclick="expandContract('post_dump')">Show $_POST dump</a></p> 
    6262<div id="post_dump" style="display:none"><pre class='debug_dump'> 
    63 <?= print_r($_POST, true)?> 
     63<?php echo print_r($_POST, true) ?> 
    6464</pre></div> 
    6565 
    6666<p><a href="#" onclick="expandContract('cookie_dump')">Show $_COOKIE dump</a></p> 
    6767<div id="cookie_dump" style="display:none"><pre class='debug_dump'> 
    68 <?= print_r($_COOKIE, true)?> 
     68<?php echo print_r($_COOKIE, true) ?> 
    6969</pre></div> 
    7070 
    7171<p><a href="#" onclick="expandContract('file_dump')">Show $_FILES dump</a></p> 
    7272<div id="file_dump" style="display:none"><pre class='debug_dump'> 
    73 <?= print_r($_FILES, true)?> 
     73<?php echo print_r($_FILES, true) ?> 
    7474</pre></div> 
    7575 
  • trunk/trax/vendor/trax/templates/helper.php

    r72 r117  
    1 <? 
     1<?php 
    22# Anything added to this helper will be available to all templates in the [class_name]Controller. 
    33 
  • trunk/trax/vendor/trax/templates/model.php

    r72 r117  
    1 <? 
     1<?php 
    22 
    33class [class_name] extends ActiveRecord {       
  • trunk/trax/vendor/trax/templates/scaffolds/add.phtml

    r113 r117  
    1 <h1>New <?= $model_object_name ?></h1> 
     1<h1>New <?php echo $model_object_name ?></h1> 
    22 
    3 <?= error_messages_for($model_object_name) ?> 
    4 <?= form($model_object_name, array(":action" => "add",'submit_value' => "Create")) ?> 
     3<?php echo error_messages_for($model_object_name) ?> 
     4<?php echo form($model_object_name, array(":action" => "add", "submit_value" => "Create")) ?> 
    55 
    6 <?= link_to("Back", array(":action" => "index")) ?> 
     6<?php echo link_to("Back", array(":action" => "index")) ?> 
  • trunk/trax/vendor/trax/templates/scaffolds/edit.phtml

    r113 r117  
    1 <h1>Editing <?= $model_object_name ?></h1> 
     1<h1>Editing <?php echo $model_object_name ?></h1> 
    22 
    3 <?= error_messages_for($model_object_name) ?> 
    4 <?= form($model_object_name, array(":action" => "edit",'submit_value' => "Update")) ?> 
     3<?php echo error_messages_for($model_object_name) ?> 
     4<?php echo form($model_object_name, array(":action" => "edit", "submit_value" => "Update")) ?> 
    55 
    6 <?= link_to("Show", array(":action" => "show", ":id" => $$model_object_name->id)) ?> | 
    7 <?= link_to("Back", array(":action" => "index")) ?> 
     6<?php echo link_to("Show", array(":action" => "show", ":id" => $$model_object_name->id)) ?> | 
     7<?php echo link_to("Back", array(":action" => "index")) ?> 
  • trunk/trax/vendor/trax/templates/scaffolds/generator_templates/controller.php

    r113 r117  
    1 < ? 
     1< ?php 
    22 
    3 class <?= $controller_class_name ?>Controller extends ApplicationController { 
     3class <?php echo $controller_class_name ?>Controller extends ApplicationController { 
    44 
    5 <? foreach($non_scaffolded_actions as $action): ?> 
    6     function <?= $action ?>() { 
     5<?php foreach($non_scaffolded_actions as $action): ?> 
     6    function <?php echo $action ?>() { 
    77    } 
    88    
    9 <? endforeach; ?> 
     9<?php endforeach; ?> 
    1010    function index() { 
    11         $<?=$singluar_model_name?> = new <?=$model_class_name?>(); 
    12         $this-><?=$plural_model_name?> = $<?=$singluar_model_name?>->find_all(); 
    13         $this->content_columns = $<?=$singluar_model_name?>->content_columns; 
     11        $<?php echo $singluar_model_name ?> = new <?php echo $model_class_name ?>(); 
     12        $this-><?php echo $plural_model_name ?> = $<?php echo $singluar_model_name ?>->find_all(); 
     13        $this->content_columns = $<?php echo $singluar_model_name ?>->content_columns; 
    1414    } 
    1515     
    1616    function show() { 
    17         $<?=$singluar_model_name?> = new <?=$model_class_name?>(); 
    18         $this-><?=$singluar_model_name?> = $<?=$singluar_model_name?>->find($_REQUEST['id']); 
     17        $<?php echo $singluar_model_name ?> = new <?php echo $model_class_name ?>(); 
     18        $this-><?php echo $singluar_model_name ?> = $<?php echo $singluar_model_name ?>->find($_REQUEST['id']); 
    1919    } 
    2020     
    2121    function add() { 
    22         $this-><?=$singluar_model_name?> = new <?=$model_class_name?>($_REQUEST['<?=$singluar_model_name?>']); 
     22        $this-><?php echo $singluar_model_name ?> = new <?php echo $model_class_name ?>($_REQUEST['<?php echo $singluar_model_name ?>']); 
    2323        if($_POST) { 
    24             if($this-><?=$singluar_model_name?>->save($_POST['<?=$singluar_model_name?>'])) { 
    25                 Session::flash('notice', "<?=$human_model_name?> was successfully created."); 
     24            if($this-><?php echo $singluar_model_name ?>->save($_POST['<?php echo $singluar_model_name ?>'])) { 
     25                Session::flash('notice', "<?php echo $human_model_name ?> was successfully created."); 
    2626                $this->redirect_to = url_for(array(":action" => "index")); 
    2727            } else { 
    28                 Session::flash('error', "Error adding <?=$singluar_model_name?> to the database."); 
     28                Session::flash('error', "Error adding <?php echo $singluar_model_name ?> to the database."); 
    2929            } 
    3030        } 
     
    3232     
    3333    function edit() { 
    34         $<?=$singluar_model_name?> = new <?=$model_class_name?>(); 
    35         $this-><?=$singluar_model_name?> = $<?=$singluar_model_name?>->find($_REQUEST['id']);    
     34        $<?php echo $singluar_model_name ?> = new <?php echo $model_class_name ?>(); 
     35        $this-><?php echo $singluar_model_name ?> = $<?php echo $singluar_model_name ?>->find($_REQUEST['id']);  
    3636        if($_POST) { 
    37             if($this-><?=$singluar_model_name?>->save($_POST['<?=$singluar_model_name?>'])) { 
    38                 Session::flash('notice', "<?=$human_model_name?> was successfully updated."); 
    39                 $this->redirect_to = url_for(array(":action" => "show", ":id" => $this-><?=$singluar_model_name?>)); 
     37            if($this-><?php echo $singluar_model_name ?>->save($_POST['<?php echo $singluar_model_name ?>'])) { 
     38                Session::flash('notice', "<?php echo $human_model_name ?> was successfully updated."); 
     39                $this->redirect_to = url_for(array(":action" => "show", ":id" => $this-><?php echo $singluar_model_name ?>)); 
    4040            } else { 
    41                 Session::flash('error', "Error saving <?=$singluar_model_name?> to the database."); 
     41                Session::flash('error', "Error saving <?php echo $singluar_model_name ?> to the database."); 
    4242            } 
    4343        } 
     
    4646    function delete() { 
    4747        if($_REQUEST['id'] > 0) { 
    48             $<?=$singluar_model_name?> = new <?=$model_class_name?>(); 
    49             $<?=$singluar_model_name?> = $<?=$singluar_model_name?>->find($_REQUEST['id']); 
    50             if($<?=$singluar_model_name?>->delete()) { 
    51                 Session::flash('notice', "<?=$human_model_name?> was successfully deleted."); 
     48            $<?php echo $singluar_model_name ?> = new <?php echo $model_class_name ?>(); 
     49            $<?php echo $singluar_model_name ?> = $<?php echo $singluar_model_name ?>->find($_REQUEST['id']); 
     50            if($<?php echo $singluar_model_name ?>->delete()) { 
     51                Session::flash('notice', "<?php echo $human_model_name ?> was successfully deleted."); 
    5252            } else { 
    53                 Session::flash('error', "Error deleting <?=$singluar_model_name?> from the database."); 
     53                Session::flash('error', "Error deleting <?php echo $singluar_model_name ?> from the database."); 
    5454            } 
    5555        } 
  • trunk/trax/vendor/trax/templates/scaffolds/generator_templates/form_scaffolding.phtml

    r113 r117  
    1 < ?= error_messages_for("<?= $singluar_model_name ?>") ? > 
     1< ?php echo error_messages_for("<?php echo $singluar_model_name ?>") ? > 
    22 
    3 <!--[form:<?= $singluar_model_name ?>]--> 
    4 <? 
     3<!--[form:<?php echo $singluar_model_name ?>]--> 
     4<?php 
    55    $ar_helper = new ActiveRecordHelper(); 
    66    $ar_helper->scaffolding = true; 
    77    echo $ar_helper->all_input_tags($this->{$singluar_model_name}, $singluar_model_name, array());  
    88?> 
    9 <!--[eoform:<?= $singluar_model_name ?>]--> 
     9<!--[eoform:<?php echo $singluar_model_name ?>]--> 
  • trunk/trax/vendor/trax/templates/scaffolds/generator_templates/layout.phtml

    r113 r117  
    33<html> 
    44<head> 
    5   <title>Scaffolding : <?= $controller_name ?></title> 
     5  <title>Scaffolding : <?php echo $controller_name ?></title> 
    66  <style> 
    77    body { background-color: #fff; color: #333; } 
     
    8282<body> 
    8383 
    84 < ? if(Session::isset_flash("notice")): ? > 
    85     <p style="color: green">< ?= Session::flash("notice") ? ></p> 
    86 < ? elseif(Session::isset_flash("error")): ? > 
    87     <p style="color: red">< ?= Session::flash("error") ? ></p> 
    88 < ? endif; ? > 
     84< ?php if(Session::isset_flash("notice")): ? > 
     85    <p style="color: green">< ?php echo Session::flash("notice") ? ></p> 
     86< ?php elseif(Session::isset_flash("error")): ? > 
     87    <p style="color: red">< ?php echo Session::flash("error") ? ></p> 
     88< ?php endif; ? > 
    8989 
    90 < ?= $content_for_layout ? > 
     90< ?php echo $content_for_layout ? > 
    9191 
    9292</body> 
  • trunk/trax/vendor/trax/templates/scaffolds/generator_templates/view_add.phtml

    r113 r117  
    1 <h1>New <?= $singluar_model_name ?></h1> 
     1<h1>New <?php echo $singluar_model_name ?></h1> 
    22 
    3 < ?= start_form_tag(array(":action" => "add")) ? > 
    4     < ?= $this->render_partial("form") ? ><br> 
    5     < ?= submit_tag("Create") ? > 
    6 < ?= end_form_tag() ? > 
     3< ?php echo start_form_tag(array(":action" => "add")) ? > 
     4    < ?php echo $this->render_partial("form") ? ><br> 
     5    < ?php echo submit_tag("Create") ? > 
     6< ?php echo end_form_tag() ? > 
    77 
    88<br> 
    99 
    10 < ?= link_to("Back", array(":action" => "index")) ? > 
     10< ?php echo link_to("Back", array(":action" => "index")) ? > 
  • trunk/trax/vendor/trax/templates/scaffolds/generator_templates/view_edit.phtml

    r113 r117  
    1 <h1>Editing <?= $singluar_model_name ?></h1> 
     1<h1>Editing <?php echo $singluar_model_name ?></h1> 
    22 
    3 < ?= start_form_tag(array(":action" => "edit", ":id" => $<?= $singluar_model_name ?>)) ? > 
    4     < ?= $this->render_partial("form") ? ><br> 
    5     < ?= submit_tag("Edit") ? > 
    6 < ?= end_form_tag() ? > 
     3< ?php echo start_form_tag(array(":action" => "edit", ":id" => $<?php echo $singluar_model_name ?>)) ? > 
     4    < ?php echo $this->render_partial("form") ? ><br> 
     5    < ?php echo submit_tag("Edit") ? > 
     6< ?php echo end_form_tag() ? > 
    77 
    88<br> 
    99 
    10 < ?= link_to("Show", array(":action" => "show", ":id" => $<?= $singluar_model_name ?>)) ? > | 
    11 < ?= link_to("Back", array(":action" => "index")) ? > 
     10< ?php echo link_to("Show", array(":action" => "show", ":id" => $<?php echo $singluar_model_name ?>)) ? > | 
     11< ?php echo link_to("Back", array(":action" => "index")) ? > 
  • trunk/trax/vendor/trax/templates/scaffolds/generator_templates/view_index.phtml

    r113 r117  
    1 <h1>Listing <?= $plural_model_name ?></h1> 
     1<h1>Listing <?php echo $plural_model_name ?></h1> 
    22 
    33<table border="0" cellpadding="2" cellspacing="2"> 
    4 < ? if(count($<?=$plural_model_name?>)): ? >  
     4< ?php if(count($<?php echo $plural_model_name ?>)): ? >  
    55    <tr>  
    6         < ? foreach($content_columns as $column): ? > 
    7             <th>< ?= $column['human_name'] ? ></th> 
    8         < ? endforeach; ? > 
     6        < ?php foreach($content_columns as $column): ? > 
     7            <th>< ?php echo $column['human_name'] ? ></th> 
     8        < ?php endforeach; ? > 
    99    </tr> 
    1010   
    11     < ? foreach($<?=$plural_model_name?> as $<?=$singluar_model_name?>): ? > 
     11    < ?php foreach($<?php echo $plural_model_name ?> as $<?php echo $singluar_model_name ?>): ? > 
    1212        <tr> 
    13             < ? foreach($<?=$singluar_model_name?>->content_columns as $column): ? > 
    14                 <td>< ?= $<?=$singluar_model_name?>->send($column['name']) ? ></td> 
    15             < ? endforeach; ? > 
    16             <td>< ?= link_to('Show', array(":action" => 'show', ":id" => $<?=$singluar_model_name?>)) ? ></td> 
    17             <td>< ?= link_to('Edit', array(":action" => 'edit', ":id" => $<?=$singluar_model_name?>)) ? ></td> 
    18             <td>< ?= link_to('Delete', array(":action" => 'delete', ":id" => $<?=$singluar_model_name?>), array("confirm" => "Are you sure?")) ? ></td> 
     13            < ?php foreach($<?php echo $singluar_model_name ?>->content_columns as $column): ? > 
     14                <td>< ?php echo $<?php echo $singluar_model_name ?>->send($column['name']) ? ></td> 
     15            < ?php endforeach; ? > 
     16            <td>< ?php echo link_to("Show",   array(":action" => "show",   ":id" => $<?php echo $singluar_model_name ?>)) ? ></td> 
     17            <td>< ?php echo link_to("Edit",   array(":action" => "edit",   ":id" => $<?php echo $singluar_model_name ?>)) ? ></td> 
     18            <td>< ?php echo link_to("Delete", array(":action" => "delete", ":id" => $<?php echo $singluar_model_name ?>), array("confirm" => "Are you sure?")) ? ></td> 
    1919        </tr> 
    20     < ? endforeach; ? > 
    21 < ? else: ? > 
     20    < ?php endforeach; ? > 
     21< ?php else: ? > 
    2222    <tr> 
    23         <td>No <?= $plural_model_name ?> found.</td> 
     23        <td>No <?php echo $plural_model_name ?> found.</td> 
    2424    </tr> 
    25 < ? endif; ? > 
     25< ?php endif; ? > 
    2626</table> 
    2727 
    2828<br> 
    2929 
    30 < ?= link_to("New post", array(":action" => "add")) ? > 
     30< ?php echo link_to("New post", array(":action" => "add")) ? > 
  • trunk/trax/vendor/trax/templates/scaffolds/generator_templates/view_show.phtml

    r113 r117  
    1 < ? if(count($<?=$singluar_model_name?>->content_columns)): ? > 
    2     < ? foreach($<?=$singluar_model_name?>->content_columns as $column): ? > 
     1< ?php if(count($<?php echo $singluar_model_name ?>->content_columns)): ? > 
     2    < ?php foreach($<?php echo $singluar_model_name ?>->content_columns as $column): ? > 
    33        <p> 
    4             <b>< ?= $column['human_name'] ? >:</b> 
    5             < ?= $<?=$singluar_model_name?>->send($column['name']) ? > 
     4            <b>< ?php echo $column['human_name'] ? >:</b> 
     5            < ?php echo $<?php echo $singluar_model_name ?>->send($column['name']) ? > 
    66        </p> 
    7     < ? endforeach; ? > 
    8 < ? else: ? > 
     7    < ?php endforeach; ? > 
     8< ?php else: ? > 
    99    no table info found. 
    10 < ? endif; ? > 
     10< ?php endif; ? > 
    1111 
    1212<br> 
    1313 
    14 < ?= link_to("Edit", array(":action" => "edit", ":id" => $<?= $singluar_model_name ?>)) ? > | 
    15 < ?= link_to("Back", array(":action" => "index")) ? > 
     14< ?php echo link_to("Edit", array(":action" => "edit", ":id" => $<?php echo $singluar_model_name ?>)) ? > | 
     15< ?php echo link_to("Back", array(":action" => "index")) ? > 
  • trunk/trax/vendor/trax/templates/scaffolds/index.phtml

    r113 r117  
    1 <h1>Listing <?= $model_name_plural ?></h1> 
     1<h1>Listing <?php echo $model_name_plural ?></h1> 
    22 
    33<table border="0" cellpadding="2" cellspacing="2"> 
    4 <? if(count($models)): ?>  
     4<?php if(count($models)): ?>  
    55    <tr>  
    6         <? foreach($content_columns as $column): ?> 
    7             <th><?= $column['human_name'] ?></th> 
    8         <? endforeach; ?> 
     6        <?php foreach($content_columns as $column): ?> 
     7            <th><?php echo $column['human_name'] ?></th> 
     8        <?php endforeach; ?> 
     9    </tr>  
     10    <?php foreach($models as $model): ?> 
     11        <tr> 
     12            <?php foreach($model->content_columns as $column): ?> 
     13                <td><?php echo $model->send($column['name']) ?></td> 
     14            <?php endforeach; ?> 
     15            <td><?php echo link_to("Show",   array(":action" => "show",   ":id" => $model)) ?></td> 
     16            <td><?php echo link_to("Edit",   array(":action" => "edit",   ":id" => $model)) ?></td> 
     17            <td><?php echo link_to("Delete", array(":action" => "delete", ":id" => $model), array("confirm" => "Are you sure?")) ?></td> 
     18        </tr> 
     19    <?php endforeach; ?> 
     20<?php else: ?> 
     21    <tr> 
     22        <td>No <?php echo $model_name_plural ?> found.</td> 
    923    </tr> 
    10    
    11     <? foreach($models as $model): ?> 
    12         <tr> 
    13             <? foreach($model->content_columns as $column): ?> 
    14                 <td><?= $model->send($column['name']) ?></td> 
    15             <? endforeach; ?> 
    16             <td><?= link_to('Show', array(":action" => 'show', ":id" => $model)) ?></td> 
    17             <td><?= link_to('Edit', array(":action" => 'edit', ":id" => $model)) ?></td> 
    18             <td><?= link_to('Delete', array(":action" => 'delete', ":id" => $model), array("confirm" => "Are you sure?")) ?></td> 
    19         </tr> 
    20     <? endforeach; ?> 
    21 <? else: ?> 
    22     <tr> 
    23         <td>No <?= $model_name_plural ?> found.</td> 
    24     </tr> 
    25 <? endif; ?> 
     24<?php endif; ?> 
    2625</table> 
    2726 
    2827<br /> 
    2928 
    30 <?= link_to('New '.$model_object_name, array(":action" => 'add')) ?> 
     29<?php echo link_to("New ".$model_object_name, array(":action" => "add")) ?> 
  • trunk/trax/vendor/trax/templates/scaffolds/layout.phtml

    r106 r117  
    8282<body> 
    8383 
    84 <? if(Session::isset_flash("notice")): ?> 
    85     <p style="color: green"><?= Session::flash("notice") ?></p> 
    86 <? elseif(Session::isset_flash("error")): ?> 
    87     <p style="color: red"><?= Session::flash("error") ?></p> 
    88 <? endif; ?> 
     84<?php if(Session::isset_flash("notice")): ?> 
     85    <p style="color: green"><?php echo Session::flash("notice") ?></p> 
     86<?php elseif(Session::isset_flash("error")): ?> 
     87    <p style="color: red"><?php echo Session::flash("error") ?></p> 
     88<?php endif; ?> 
    8989 
    90 <?= $content_for_layout ?> 
     90<?php echo $content_for_layout ?> 
    9191 
    9292</body> 
  • trunk/trax/vendor/trax/templates/scaffolds/show.phtml

    r109 r117  
    1 <? if(count($$model_object_name->content_columns)): ?> 
    2     <? foreach($$model_object_name->content_columns as $column): ?> 
     1<?php if(count($$model_object_name->content_columns)): ?> 
     2    <?php foreach($$model_object_name->content_columns as $column): ?> 
    33        <p> 
    4             <b><?= $column['human_name'] ?>:</b> 
    5             <?= $$model_object_name->$column['name'] ?> 
     4            <b><?php echo $column['human_name'] ?>:</b>&nbsp; 
     5            <?php echo $$model_object_name->$column['name'] ?> 
    66        </p> 
    7     <? endforeach; ?> 
    8 <? else: ?> 
     7    <?php endforeach; ?> 
     8<?php else: ?> 
    99    no table info found.<br> 
    10 <? endif; ?> 
     10<?php endif; ?> 
    1111<br> 
    12 <?= link_to("Edit", array(":action" => "edit", ":id" => $$model_object_name)) ?> | 
    13 <?= link_to("Back", array(":action" => "index")) ?> 
     12<?php echo link_to("Edit", array(":action" => "edit", ":id" => $$model_object_name)) ?> | 
     13<?php echo link_to("Back", array(":action" => "index")) ?> 
  • trunk/trax/vendor/trax/trax_exceptions.php

    r62 r117  
    1 <? 
     1<?php 
    22# $Id: trax_exceptions.php 53 2005-10-29 14:49:53Z john $ 
    33# 
  • trunk/trax/vendor/trax/trax_generator.php

    r113 r117  
    1 <? 
     1<?php 
    22# $Id$ 
    33# 
     
    7777                            } 
    7878                        } 
    79                         $this->generate_controller($command_name,$views); 
     79                        $this->generate_controller($command_name, $views); 
    8080                    } 
    8181                    break; 
     
    9797                            } 
    9898                        }                         
    99                         $this->generate_scaffold($command_name,$controller_name,$views); 
     99                        $this->generate_scaffold($command_name, $controller_name, $views); 
    100100                    } 
    101101                    break;                     
     
    415415     
    416416    function fix_php_brackets($string) { 
    417         return str_replace("? >", "?>", str_replace("< ?", "<?", $string));             
     417        return str_replace("? >", "?>", str_replace("< ?php", "<?php", $string));             
    418418    } 
    419419